Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve cert validation diagnostic on OSX #1513

Merged
merged 5 commits into from
Jan 14, 2020
Merged

Conversation

wfurt
Copy link
Member

@wfurt wfurt commented Jan 9, 2020

Right now when OS does not like remote certificate it is quite difficult to figure out why. (like #666)
This change will try to extract reason code from OS and it will emit tracing entry so it is possible to get to it easily.

COMPlus_EnableEventPipe=1
COMPlus_EventPipeConfig=Microsoft-System-Net-Security:0xFFFFFFFFFFFFFFFF:3

will produce something like

<Event MSec="747.1234" PID="66553" PName="Process(66553)" TID="12435200" EventName="ErrorMessage" ProviderName="Microsoft-System-Net-Security" thisOrContextObject="SafeDeleteSslContext#3129430" memberName="VerifyCertificateProperties" message="Cert name validation for 'github.com' failed -2147408889"/>

In this case that can be mapped to CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE for case described in #666 or to CSSMERR_APPLETP_CA_PIN_MISMATCH in #805

related to #666
related to #805
contributes to https://github.com/dotnet/corefx/issues/34905

@wfurt wfurt requested review from bartonjs and a team January 9, 2020 01:29
@wfurt wfurt self-assigned this Jan 9, 2020
@wfurt wfurt merged commit 8cdefc1 into dotnet:master Jan 14, 2020
@wfurt wfurt deleted the osx_ssl_diag branch January 14, 2020 20:05
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants