ZitchCode / SecureHttpClient

Cross-platform HttpClientHandler with TLS1.2 and Certificate Pinning
MIT License
33 stars 6 forks source link

[question] is there a way also to force accept any certificate #19

Closed gsgou closed 1 year ago

gsgou commented 1 year ago

relates to this one: https://github.com/xamarin/xamarin-android/issues/4688#issuecomment-931628302 the workarounds seem not to work.

tranb3r commented 1 year ago

I'm not sure I understand your question. Could you please provide more details?

gsgou commented 1 year ago

Is there any parallel with SecureHttpClientHandler to:

                var httpClientHandler =
                    new HttpClientHandler();
                    //new SecureHttpClientHandler(null) { UseProxy = false };
                httpClientHandler.ClientCertificateOptions = ClientCertificateOption.Manual;
                httpClientHandler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
tranb3r commented 1 year ago

Sorry for the late answer... I don't want to implement a way to accept any certificate, since the purpose of this library is to increase the security. You should use the default HttpClientHandler if you want to do that.

gsgou commented 1 year ago

I get your point, thanks.