alexrainman / ModernHttpClient

ModernHttpClient
MIT License
126 stars 27 forks source link

'NativeMessageHandler' does not contain a definition for 'EnableUntrustedCertificates' #45

Closed stesvis closed 4 years ago

stesvis commented 4 years ago

Hello,

the EnableUntrustedCertificates property seems to have disappeared in version 3.3.4.

My code used to be like this: var client = new HttpClient(new NativeMessageHandler() { Timeout = new TimeSpan(0, 0, 30), EnableUntrustedCertificates = true, DisableCaching = true });

but now i get the exception:

'NativeMessageHandler' does not contain a definition for 'EnableUntrustedCertificates'

What should I do from now on? thx

alexrainman commented 4 years ago

@stesvis TLSConfig has a property named DangerousAcceptAnyServerCertificateValidator. Use that.

stesvis commented 4 years ago

My bad, i should have searched it in the release notes, thank you.