Continuously getting kSecTrustResultRecoverableTrustFailure while trust evaluation - iphone

后端 未结 1 1133
南旧
南旧 2021-01-19 15:42

I want to securely communicate with my server and here is what I am doing...

NSURLProtectionSpace *protectionSpace = [challenge protectionSpace];
SecTrustRef         


        
相关标签:
1条回答
  • 2021-01-19 16:32

    SecTrustResultRecoverableTrustFailure happens if

    • the certificate is md5 hashed (IOS5)
    • the server does not present the root and intermediate certificates
    • the SecTrustSetAnchorCertificatesOnly(trust,YES) is set and the anchor certificate is only in the built in anchor certificates
    • the certificate is expired
    • ?

    I solved my problem by configuring the webserver to send the whole certificate chain instead of only the server certificate.

    By configuring my apache mod_ssl: https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcertificatechainfile

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