-
Notifications
You must be signed in to change notification settings - Fork 532
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
AndroidMessageHandler seems to be ignoring ClientCertificates #9576
Comments
We've found some similar issues:
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
|
It looks like the fixed issue you reference was fixed in July 2024, so it would likely only be in .NET 9 and not .NET 8. Can you try on .NET 9 and see if it works there? |
Hi @jpobst, thanks for the answer. I updated my project from .NET8 to .NET9 and now the certificate seems to be working as expected. Since in .NET9 new X509Certificate2(certificate, password) is now obsolete: "Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates." To load the certificate I had to use X509CertificateLoader.LoadPkcs12FromFile(certificate, password) Just to know, are there any plans on implementing this solution also for .NET8? |
I will defer to @simonrozsival and @jonpryor about the risk involved with backporting this to .NET 8. |
The implementation on .the .NET runtime side needed to add a Java library to handle the callbacks. This was rather big change that would be non-trivial to backport (especially due to the fact that it required changes across more repositories to account for the extra library). |
I think this is our official-ish policy on .NET 8 now, so a backport isn't likely:
|
Description
I have an old .net framework 4.5 project using HttpClient with HttpClientHandler in order to load client certificate for query. This is the code I'm using. Works as expected:
Now I'm trying to recreate that code on my .net 8 MAUI project. I started with the Android specific code:
But the web service I'm sending my request keeps on returning me 403 - No certificate detected.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.100 SR10
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 14
Did you find any workaround?
Relevant log output
The text was updated successfully, but these errors were encountered: