.net core - How to ignore "System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates" on non-Windows platforms? -


i have deployed kubernetes cluster in microsoft azure , call of rest apis .net core c# program using https. certificates used when deploying cluster not in trusted ca. when run program on mac, following error: "system.net.http.curlexception: peer certificate cannot authenticated given ca certificates"

on windows i'm able set custom servercertificatevalidationcallback in order ignore error:

    winhttphandler winhttphandler = new winhttphandler();     winhttphandler.servercertificatevalidationcallback = validateservercertificate;  public static bool validateservercertificate(     httprequestmessage request,     x509certificate certificate,     x509chain chain,     sslpolicyerrors sslpolicyerrors) {     return true; } 

but, not supported under .net core on non-windows platforms.

how can ignore error on other platforms?


Comments