-
Hello. Recently I started using this amazing package and faced with a weird issue. The issue happens right after proxy server restart if the previos cert was not deleted from the cert storage. The client simply gets unsecured connection. Am I missing something ? Here my code sample:
Also I noted that CreateRootCertificate() method creates two certificates (Current User/Personal/Certificates and Current User/Trusted Root Certificate Authorities), however RemoveTrustedRootCertificateAsAdmin and ClearRootCertificate do not delete the one from Current User/Personal/Certificates. It leads to duplicates on every cert creation. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, I've found a solution after debugging Titanium.Web.Proxy. Here the working code sample:
It would be great if proxyServer.CertificateManager.LoadRootCertificate() (the overload without parameters) could load the RootCertificate internally as well. From user perspective the following code looks a bit weird Case 1
Case 2
I think it makes sense if the LoadRootCertificate() method without parameters would have the same signature as the overload with parameters (it should load RootCertificate internally and return boolean if it does not exist) Also when proxyServer.CertificateManager.RootCertificate is null after calling RemoveTrustedRootCertificateAsAdmin() it won't delete the personal certificate, because of the following condition:
I think need to add an extra condition to check if the cert is exist by using defaultRootRootCertificateName/password combination. |
Beta Was this translation helpful? Give feedback.
Hey, I've found a solution after debugging Titanium.Web.Proxy.
Here the working code sample: