Mono problems with cert and mozroots

后端 未结 2 905
醉话见心
醉话见心 2021-02-14 01:11

I am using this command on my mono VM

sudo mozroots --import --sync

It appears to be getting the cert from this site.

I then try to co

2条回答
  •  被撕碎了的回忆
    2021-02-14 01:35

    Follow-up about bug 606002 - here is the code to ignore said error code. Call it once in your initialization

                ServicePointManager.ServerCertificateValidationCallback += delegate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslPolicyErrors) {
                if (sslPolicyErrors == SslPolicyErrors.RemoteCertificateChainErrors) {
                    foreach (X509ChainStatus status in chain.ChainStatus) {
                        if (status.Status != X509ChainStatusFlags.RevocationStatusUnknown) {
                            return false;
                        }
                    }
                    return true;
                }
    
                return false;
            };
    

提交回复
热议问题