justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 618 forks source link

Add Targetting .Net Framework 4.7.2 and remove Bouncy Castle dependancy #828

Open ewwink opened 3 years ago

ewwink commented 3 years ago

.Net Framework 4.7.2 and .Net Standard 2.1 has class CertificateRequest for generating certificate You can see example code for creating/chaining certificate here

justcoding121 commented 3 years ago

We cannot get rid of bouncy castle because, we also have to support non-windows machines.

There is already an option to not use BouncyCastle for Windows.

https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/Certificates/CertificateManager.cs#L19

https://github.com/justcoding121/Titanium-Web-Proxy/blob/develop/src/Titanium.Web.Proxy/Certificates/WinCertificateMaker.cs

It had a bug in the past, not sure if it is already fixed. If someone could replace that with thus CertificateRequest may be @honfika can review when he gets a chance