CFNetwork SSLHandshake failed iOS 9

后端 未结 11 1213
面向向阳花
面向向阳花 2020-11-22 09:38

has anyone with the iOS 9 beta 1 had this issue?

I use standard NSURLConnection to connect to a webservice and as soon as a call is made to the webservice i get th

11条回答
  •  耶瑟儿~
    2020-11-22 10:14

    In iOS 10+, the TLS string MUST be of the form "TLSv1.0". It can't just be "1.0". (Sigh)


    The following combination of the other Answers works.

    Let's say you are trying to connect to a host (YOUR_HOST.COM) that only has TLS 1.0.

    Add these to your app's Info.plist

    NSAppTransportSecurity
    
        NSExceptionDomains
        
            YOUR_HOST.COM
            
                NSIncludesSubdomains
                
                NSTemporaryExceptionAllowsInsecureHTTPLoads
                
                NSTemporaryExceptionMinimumTLSVersion
                TLSv1.0
                NSTemporaryExceptionRequiresForwardSecrecy
                
            
        
    
    

提交回复
热议问题