Xamarin Cross Platform Certificate pinning

前端 未结 1 1221

I am designing an application using Xamarin and I want to boost our security by using certificate pinning. But I cannot find a way to do it. I can use the native approach for an

相关标签:
1条回答
  • 2021-01-21 00:26

    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.

    0 讨论(0)
提交回复
热议问题