CFNetwork SSLHandshake failed iOS 9

后端 未结 11 1100
面向向阳花
面向向阳花 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条回答
  •  旧时难觅i
    2020-11-22 10:14

    For more info Configuring App Transport Security Exceptions in iOS 9 and OSX 10.11

    Curiously, you’ll notice that the connection attempts to change the http protocol to https to protect against mistakes in your code where you may have accidentally misconfigured the URL. In some cases, this might actually work, but it’s also confusing.

    This Shipping an App With App Transport Security covers some good debugging tips

    ATS Failure

    Most ATS failures will present as CFErrors with a code in the -9800 series. These are defined in the Security/SecureTransport.h header

    2015-08-23 06:34:42.700 SelfSignedServerATSTest[3792:683731] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
    

    CFNETWORK_DIAGNOSTICS

    Set the environment variable CFNETWORK_DIAGNOSTICS to 1 in order to get more information on the console about the failure

    nscurl

    The tool will run through several different combinations of ATS exceptions, trying a secure connection to the given host under each ATS configuration and reporting the result.

    nscurl --ats-diagnostics https://example.com
    

提交回复
热议问题