简体   繁体   English

在钛网代理中使用自定义SSL证书

[英]Using custom SSL certificates in titanium web proxy

I have used Titanium web proxy for a windows forms application and there, I intercept https traffic and update it. 我已经使用Titanium Web代理用于Windows窗体应用程序,在那里,我拦截https流量并更新它。 I have first used titanium root certificate and it worked fine. 我第一次使用钛根证书,它工作正常。
when I was trying to use custom ssl certificate as below 当我尝试使用自定义ssl证书时,如下所示

proxyServer.CertificateManager.RootCertificate = new X509Certificate2("default.pfx", 
                    "password",
                    X509KeyStorageFlags.MachineKeySet);

proxyServer.CertificateManager.TrustRootCertificate(true);

but I couldn't able to decrypt the https traffic and it says 但我无法解密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."

how to decrypt the https traffic using custom ssl certificate in titanium-web proxy. 如何使用钛网代理中的自定义ssl证书解密https流量

Issue was fixed when I add custom certification name and issuer name to proxyserver constructor and didn't needed any of above code. 当我向proxyserver构造函数添加自定义证书名称和颁发者名称并且不需要上述任何代码时,问题已得到修复。 just fixed the issue by below code and certificate needs to installed in the machine 只需通过以下代码修复问题,并且需要在机器中安装证书

ProxyServer proxyServer = new ProxyServer("certificate.pfx", "Issuer Name",true,true,true);
proxyServer.CertificateManager.PfxPassword = "Password";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM