Open NNNNolan opened 2 years ago
I had install CA Bundle certificate and trust it .
proxyServer.CertificateManager.CertificateEngine = CertificateEngine.BouncyCastle; proxyServer.CertificateManager.RootCertificate = new X509Certificate2(basePath1 + @"rootCert.pfx", string.Empty, X509KeyStorageFlags.Exportable); //if (proxyServer.CertificateManager.RootCertificate == null) //{ // proxyServer.CertificateManager.CreateRootCertificate(true); //} //proxyServer.CertificateManager.TrustRootCertificate(); //proxyServer.CertificateManager.TrustRootCertificateAsAdmin(); //File.WriteAllBytes(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ca.cer"), proxyServer.CertificateManager.RootCertificate.Export(System.Security.Cryptography.X509Certificates.X509ContentType.Cert));
Couldn't authenticate host 'www.baidu.com' with certificate '*.baidu.com'
I had install CA Bundle certificate and trust it .