-
Notifications
You must be signed in to change notification settings - Fork 5k
SslStream.AuthenticateAsServer with client certificates doesn't allow for ACCEPT #15715
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
Comments
Do you mean an invalid SERVER certificate, i.e. one that isn't trusted or perhaps expired etc.? Also, does the server REQUIRE or just ACCEPT (not required) client ssl certificates? Can you provide a copy of the server side code? We'll need that to investigate this. |
The test case is in https://github.com/tmds/KestrelHttpServer/tree/client_certificate |
By invalid I mean: self signed, not expired |
So, the "server" is Kestrel which uses .NET SslStream to implement the server-side of the HTTPS connection for the Kestrel server. I assume the server is also using CoreFx/CoreClr? And if the server REQUIRES client certificates and the client is not sending any, then getting an error back would be expected, wouldn't it? The default settings for WinHttpHandler client certificate selection is manual and it looks at the .ClientCertificates property to find the certs. And since that property by default is an empty collection, there are no certs. |
It looks like on the coreclr, clientCertificateRequired means Required and on the desktop frame it means Accept. |
Ok. So, this looks like a bug/app-compat-difference for System.Net.Security.SslStream API surface. I wil re-title the bug and assign to the right people. |
Thanks @davidsh |
Not a problem. Thanks for following-up @tmds! |
I am connecting to a server which has an invalid certificate, using HttpClientHandler (desktop) and WinHttpHandler (CoreCLR). This works fine.
When I configure the server to accept client certificates (ssl handshake), but do not provide a client certificate. The HttpClientHandler works as before, but the WinHttpHandler throws a WinHttpException (ERROR_INTERNET_SECURE_FAILURE).
The text was updated successfully, but these errors were encountered: