简体   繁体   中英

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. I have first used titanium root certificate and it worked fine.
when I was trying to use custom ssl certificate as below

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

"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.

Issue was fixed when I add custom certification name and issuer name to proxyserver constructor and didn't needed any of above code. 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";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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