CFNetwork SSLHandshake failed iOS 9

后端 未结 11 1210
面向向阳花
面向向阳花 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:16

    iOS 9 and OSX 10.11 require TLSv1.2 SSL for all hosts you plan to request data from unless you specify exception domains in your app's Info.plist file.

    The syntax for the Info.plist configuration looks like this:

    NSAppTransportSecurity
    
      NSExceptionDomains
      
        yourserver.com
        
          
          NSIncludesSubdomains
          
          
          NSExceptionAllowsInsecureHTTPLoads
          
          
          NSExceptionMinimumTLSVersion
          TLSv1.1
        
      
    
    

    If your application (a third-party web browser, for instance) needs to connect to arbitrary hosts, you can configure it like this:

    NSAppTransportSecurity
    
        
        NSAllowsArbitraryLoads
        
    
    

    If you're having to do this, it's probably best to update your servers to use TLSv1.2 and SSL, if they're not already doing so. This should be considered a temporary workaround.

    As of today, the prerelease documentation makes no mention of any of these configuration options in any specific way. Once it does, I'll update the answer to link to the relevant documentation.

提交回复
热议问题