you can not override the ssl checking. you must install and trust the self cert in the android device.
google for instruction to instal a self signed cert for your device
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi!
I cannot send request to our web server. We use self-signed certificate. Exception throws on
using HttpResponseMessage response = await HttpClient.SendAsync(requestMessage, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
I get Javax.Net.Ssl.SSLPeerUnverifiedException
Hostname *** not verified:
certificate: ***
subjectAltNames: ***
StackTrace (removed my calls because nothing interesting there):
at Xamarin.Android.Net.AndroidMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs:line 389
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
In our Xamarin Forms project the same code works fine.
Is it a bug? How can I resolve this?
Thanks.
you can not override the ssl checking. you must install and trust the self cert in the android device.
google for instruction to instal a self signed cert for your device
I have exact same issue. Self-signed certificate and trying to connect to a remote server (no localhost). @Igor Kravchenko Could you find any solution to this error?
Thanks