This is because HttpClientHandler.ServerCertificateCustomValidationCallback currently doesn't work in netcoreapp2.0 on Mac at all. See the comment in https://github.com/dotnet/corefx/issues/9728 for more information.
Note that we currently have 2 tests failing in nightly run on OSX CI:
Validate Invoke-WebRequest -SkipCertificateCheck
Validate Invoke-RestMethod -SkipCertificateCheck
Error message is:
The handler does not support custom handling of certificates with this combination of libcurl (7.49.1) and its SSL backend ("SecureTransport").
This is because
HttpClientHandler.ServerCertificateCustomValidationCallbackcurrently doesn't work innetcoreapp2.0on Mac at all. See the comment in https://github.com/dotnet/corefx/issues/9728 for more information.Note that we currently have 2 tests failing in nightly run on OSX CI:
Error message is: