Read SSL Certificate Details on WP8

后端 未结 4 1338
旧巷少年郎
旧巷少年郎 2021-01-03 03:25

I want to read certificate details (e.g. expiration date or CN) for security reasons.

Usually there are some properties in network classes available, that allow to

4条回答
  •  醉梦人生
    2021-01-03 03:44

    For WP8, you can use the StreamSocket class, which has an UpgradeToSslAsync() method that will do the TLS handshake for you as an async operation. Once that completes, you can use the .Information.ServerCertificate property to check that you got the server certificate you were expecting.

提交回复
热议问题