2012-03-20 77 views
2

我們的應用程序通過HTTPS與服務器進行通信。我們希望重新驗證客戶端的SSL證書字段。例如我想在HTTPS連接期間驗證來自服務器的SSL證書問題的CN字段。有沒有辦法檢索didReceiveAuthenticationChallenge()中的字段信息?檢索didReceiveAuthenticationChallenge中的SSL證書字段

+0

Web服務器向客戶端發送的證書?這對我來說並不合適。你能指出我的一些文件嗎? – trojanfoe 2012-07-06 10:50:37

回答

0

至於如何執行SSL的步驟的複習可以在這裏http://www.symantec.com/theme.jsp?themeid=how-ssl-works

發現@Ramesh

(所使用的功能,請看看這裏https://developer.apple.com/library/ios/#documentation/security/Reference/certifkeytrustservices/Reference/reference.html

這樣進行

  • SecTrustRef tR = [[challenge protectionSpace] serverTrust];
  • 電話SecTrustEvaluate()
  • 調用SecTrustGetCertificateAtIndex()索引爲0,那麼你可以使用OpenSSL做任何進一步的驗證