Xamarin Cross Platform Certificate pinning

不问归期 提交于 2019-12-01 22:49:39

On Android and iOS you can use the standard .NET way with ServicePointManager.ServerCertificateValidationCallback.

On Windows Phone 8 you can use StreamSocket, call UpgradeToSslAsync after connecting and then read the certificate details.

On Windows Phone 8.1 you may also use var uri = new Uri("https://someuri.com/"); var httpClient = new HttpClient(); var httpResponseMessage = await httpClient.GetAsync(uri); var certificate = httpResponseMessage.RequestMessage.TransportInformation.ServerCertificate;

So not a cross platform solution...

SecureBlackbox might be able to help with a cross platform solution, but I've only used it with Windows Phone 7.x a while ago.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!