I have been stuck for around 3 days trying to connect to a server that has a certificate which hasn\'t been signed by a trusted CA - you can add the CA\'s certificate through Az
What about hardcode returning true in your custom callback like this?
public string Ssl()
{
try
{
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
using (var wc = new WebClient())
{
var res = wc.DownloadString("https://untrusted-root.badssl.com/");
Console.WriteLine(res);
return res;
}
}
catch (Exception ex)
{
return ex.ToString();
}
}