gpt4 book ai didi

objective-c - 检索 didReceiveAuthenticationChallenge 中的 SSL 证书字段

转载 作者:行者123 更新时间:2023-12-03 16:47:29 24 4
gpt4 key购买 nike

我们的应用程序通过 HTTPS 与服务器通信。我们想要在客户端重新验证 SSL 证书字段。例如我想在 HTTPS 连接期间验证服务器颁发的 SSL 证书的 CN 字段。有没有办法检索 didReceiveAuthenticationChallenge() 中的字段信息?

最佳答案

作为 SSL 执行步骤的回顾,可以在此处找到 http://www.symantec.com/theme.jsp?themeid=how-ssl-works

@拉梅什

(使用的功能请看这里 https://developer.apple.com/library/ios/#documentation/security/Reference/certifkeytrustservices/Reference/reference.html

像这样继续

  • SecTrustRef tR = [[挑战保护空间] serverTrust];
  • 调用 SecTrustEvaluate()
  • 使用索引 0 调用 SecTrustGetCertificateAtIndex(),然后您可以使用 OpenSSL 进行进一步验证

关于objective-c - 检索 didReceiveAuthenticationChallenge 中的 SSL 证书字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9784251/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com