因为作者的做法是使用了他们的证书, 但是如果是插件引用, 感觉是无法调用的.
所以我们直接下载code 修改这里即可
namespace TinifyAPI.Internal
internal static class SSL
public static bool ValidationCallback(HttpRequestMessage req, X509Certificate2 cert, X509Chain chain, SslPolicyErrors errors)
{
mark this
//if (errors.HasFlag(SslPolicyErrors.RemoteCertificateNotAvailable)) return false;
//if (errors.HasFlag(SslPolicyErrors.RemoteCertificateNameMismatch)) return false;
//return new X509Chain() { ChainPolicy = policy }.Build(cert);
//add this
return true;
}