Checking a Public Key in canAuthenticateAgainstProtectionSpace

前端 未结 2 1851
南旧
南旧 2021-02-06 18:02

I have been asked to check the public key against a known value in canAuthenticateAgainstProtectionSpace ( a delegate callback of NSURLConnection )

This is

2条回答
  •  醉话见心
    2021-02-06 18:32

    Note that SecCertificateCopyData returns the certificate in it's "DER" form, Distinguished Encoding Rules. So you need to incorporate the certificate in your App in that form, and not as a pem or whatever format. To convert a certificate to DER with openssl use the command: openssl x509 -in server.crt -out server.der -outform DER

提交回复
热议问题