-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
The recent changes in HttpClientHandler on OSX to use the native security libraries has caused server certificate validation callbacks to not be supported. The ManagedHandler does support this, but is missing other functionality needed. WCF needs a way to instantiate a single HttpClientHandler instance to explicitly use ManagedHandler. If an instance of a WCF ChannelFactory has been configured to use certificate authentication, we need to be able to use a custom certificate validation callback so need to use ManagedHandler for that instance. If in the same process a different authentication mechanism is requested for a different instance of a WCF ChannelFactory, that instance needs to use the libcurl based HttpClientHandler implementation as it is more feature complete. While we can set the relevant environment variable before calling the HttpClientHandler constructor and then restore it to it's previous state, this isn't thread safe as we could interfere with an instantiation happening outside of WCF on another thread.