检索didReceiveAuthenticationChallenge中的SSL证书字段
问题描述:
我们的应用程序通过HTTPS与服务器进行通信。我们希望重新验证客户端的SSL证书字段。例如我想在HTTPS连接期间验证来自服务器的SSL证书问题的CN字段。有没有办法检索didReceiveAuthenticationChallenge()
中的字段信息?检索didReceiveAuthenticationChallenge中的SSL证书字段
答
至于如何执行SSL的步骤的复习可以在这里http://www.symantec.com/theme.jsp?themeid=how-ssl-works
发现@Ramesh
这样进行
- SecTrustRef tR = [[challenge protectionSpace] serverTrust];
- 电话SecTrustEvaluate()
- 调用SecTrustGetCertificateAtIndex()索引为0,那么你可以使用OpenSSL做任何进一步的验证
Web服务器向客户端发送的证书?这对我来说并不合适。你能指出我的一些文件吗? – *foe 2012-07-06 10:50:37