Skip to content

Make SSL handshake exceptions and logging useful #2359

@wfurt

Description

@wfurt

There is growing number of cases (like #27703) where uses see something like:

---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
   at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)

From that, it is very difficult to diagnose real root cause
It would be nice if the exception can provide more specific reason. This may not be complete list but it would be nice to distinguish following cases:

  • wrong time
  • unknown/untrusted CA
  • name mismatch
  • CRL/OSCP revocation issues
  • custom verification callback denial
  • extended key usage violation or other attribute problems

Metadata

Metadata

Assignees

Labels

area-System.Net.SecurityenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions