dotnet / dotnet/wcf

OSX Https certificate callbacks don't work

Open
#2,290 5 comments 0 reactions 2 assignees Claimed by @StephenBonikowsky View on GitHub
Backlog infrastructure test bug
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

There was a change in .Net Core 2.0 for HttpClient on OSX which disabled using certificate validation callbacks. As WCF always sets a callback, all https requests will fail on OSX. We can add some workarounds to WCF to enable some scenarios. For OSX only, we need to have the following behaviors for each of the possible X509CertificateValidationMode values:

X509CertificateValidationMode | Behavior
-----------------------------------|----------
None | Use the special callback handler `HttpClientHandler.DangerousAcceptAnyServerCertificateValidator`
PeerTrust | Throw `PlatformNotSupportedException`. I think we already do for other reasons
ChainTrust | Set no callback as the default behavior is chain trust
PeerOrChainTrust | Throw `PlatformNotSupportedException`. I think we already do for other reasons
Custom | Throw `PlatformNotSupportedException`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.