How to pin the Public key of a certificate on iOS

后端 未结 7 946
执笔经年
执笔经年 2020-11-30 18:15

While improving the security of an iOS application that we are developing, we found the need to PIN (the entire or parts of) the SSL certificate of server to prevent man-in-

相关标签:
7条回答
  • 2020-11-30 19:11

    You can do public key SSL pinning using the SecTrustCopyPublicKey function of the Security.framework. See an example at connection:willSendRequestForAuthenticationChallenge: of the AFNetworking project.

    If you need openSSL for iOS, use https://gist.github.com/foozmeat/5154962 It's based on st3fan/ios-openssl, which currently doesn't work.

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