-
Notifications
You must be signed in to change notification settings - Fork 533
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
Custom validation callback for server certificates in SslStream does not work #7641
Labels
Area: HTTP
Issues with sockets / HttpClient.
Comments
omghb
added
Area: Mono.Android
Issues with the Android API binding (Mono.Android.dll).
needs-triage
Issues that need to be assigned.
labels
Dec 15, 2022
jpobst
added
Area: HTTP
Issues with sockets / HttpClient.
and removed
Area: Mono.Android
Issues with the Android API binding (Mono.Android.dll).
needs-triage
Issues that need to be assigned.
labels
Dec 15, 2022
I'm already working on a solution to this problem: dotnet/runtime#77386. If everything goes well, it should be part of .NET 8. |
@simonrozsival Thanks a lot - it's working now with .NET 8 (MAUI 8). |
Should be fixed in .NET 8+. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
VS 2022 17.4.3 with MAUI
Description
Using
SslStream
with auserCertificateValidationCallback
does not work on Android.But it works on
The same issue was already resolved for HTTP handlers. See PR: Use custom validation callback for server certificates in HTTP handlers #6665
Steps to Reproduce
Just use this ctor with a
userCertificateValidationCallback
that allows a self-signed certificate to pass.SslStream(Stream, Boolean, RemoteCertificateValidationCallback)
Did you find any workaround?
Workaround: https://stackoverflow.com/a/71196389
Relevant log output
Android exception that is thrown when a self-signed certificate should be accepted by the SslStream:
The text was updated successfully, but these errors were encountered: