检索didReceiveAuthenticationChallenge中的SSL证书字段
我们的应用程序通过HTTPS与服务器通信。 我们希望重新validation客户端的SSL证书字段。 例如,我想在HTTPS连接期间从服务器validationSSL证书问题的CN字段。 有没有办法检索didReceiveAuthenticationChallenge()
中的字段信息?
作为SSL执行步骤的进一步回顾可以在这里findhttp://www.symantec.com/theme.jsp?themeid=how-ssl-works
@Ramesh
(对于使用的function,请看这里https://developer.apple.com/library/ios/#documentation/security/Reference/certifkeytrustservices/Reference/reference.html
继续这样下去
- SecTrustRef tR = [[challenge protectionSpace] serverTrust];
- 调用SecTrustEvaluate()
- 调用索引为0的SecTrustGetCertificateAtIndex(),那么你可以使用OpenSSL做进一步的validation