我已经将Titanium Web代理用于Windows窗体应用程序,在那里,我拦截了https通信并进行了更新。我第一次使用了钛根证书,效果很好。
当我尝试使用以下自定义ssl证书
proxyServer.CertificateManager.RootCertificate = new X509Certificate2("default.pfx",
"password",
X509KeyStorageFlags.MachineKeySet);
proxyServer.CertificateManager.TrustRootCertificate(true);
但是我无法解密https流量,它说
"The underlying connection was closed: An unexpected error occurred on a send." innerException says "
Authentication failed because the remote party has closed the transport stream."
如何使用titanium-web proxy.中的自定义ssl证书解密https流量
答案 0 :(得分:0)
当我将自定义证书名称和颁发者名称添加到proxyserver构造函数中并且不需要任何上述代码时,此问题已修复。只需通过以下代码解决了该问题,并且需要在计算机中安装证书
ProxyServer proxyServer = new ProxyServer("certificate.pfx", "Issuer Name",true,true,true);
proxyServer.CertificateManager.PfxPassword = "Password";