titanium-web-proxy
                                
                                 titanium-web-proxy copied to clipboard
                                
                                    titanium-web-proxy copied to clipboard
                            
                            
                            
                        Using Custom SSL Certificates
Hi, I have a .pfx file along with its password obviously... I want to use this while decrypting SSL. This is what I do:
var proxyServer = new ProxyServer("path/to/.pfx_file", "Issuer Name", true, true, true);
proxyServer.CertificateManager.PfxPassword = "password";
var httpProxy = new ExplicitProxyEndPoint(IPAddress.Parse(IP), Port, decryptSsl: true);
proxyServer.AddEndPoint(httpProxy);
proxyServer.BeforeRequest += OnBeforeRequest;
proxyServer.BeforeResponse += OnBeforeResponse;
proxyServer.AfterResponse += OnAfterResponse;
proxyServer.Start();
I had put this .pfx certificate in the client's Trusted Certificate Store. While accessing the proxy from the client it does not work... Shows security issue
The first parameter in ProxyServer is not a path, the name of the root certificate to lookUp. If I recall right it looks at the execution directory where the proxy.dll is located.
You can take a look at certificate manager for details. To use a pfx path directly, I think you would need to set call below method, before starting the proxy.
proxyServer.CertificateManager.LoadRootCertificate(pfxFilePath, password, false);
See CertificateManager implementation in below link for details.
https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/src/Titanium.Web.Proxy/Certificates/CertificateManager.cs
See CertificateManager API docs below.
https://justcoding121.github.io/Titanium-Web-Proxy/docs/api/Titanium.Web.Proxy.Network.CertificateManager.html
It would be nice if you could post a code segment for my use-case... I tried various methods but it seems I am not doing it the correct way