• Register
0 votes
194 views

Problem :

Since I upgraded the existing project with the iOS 9, I keep getting the below error :

“An SSL error has occurred and a secure connection to the server cannot be made.”

7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

It appears as if the iOS 9.0.2 is breaking requests to valid HTTPS endpoints. My current thought is that it is needing SHA-256 certs or it fails with above error.

To reproduce, just inspect the UIWebView with safari, and try to navigate to the arbitrary HTTPS endpoint as shown below :

location.href = "https://d37gvrvc0wt4s1.cloudfront.net/js/v1.4/rollbar.min.js"// [Error] Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made. (rollbar.min.js, line 0)

Now try to go to google as of course they have the SHA-256 cert:

location.href = "https://google.com"// no problemo

So adding the exception to transport the security will work to fix this. I also think that completely disabling the  NSAppTransportSecurity would also work , though I have also read that by completely disabling it can jeopardize the app review.

[ have found that by simply enumerating your domains I am trying to connect to your NSExceptionDomains dict it fixes your problem, even when by leaving NSExceptionAllowsInsecureHTTPLoads set to true.

I hope this helps you in resolving your issue.

38.6k points

Related questions

0 votes
1 answer 26 views
26 views
Problem: an SSL error has occurred and a secure connection to the server cannot be made Since I upgraded my existing project with iOS 9, Any help will be appreciated…!
asked Feb 25 Umar Ahmad 4.1k points
0 votes
1 answer 21 views
21 views
Problem: Does anyone know the solution : An ssl error has occurred and a secure connection?
asked May 23 Aurelia Maja 78.4k points
0 votes
1 answer 26 views
26 views
Problem: I'm receiving many alert from iPhone and Mac users says receiving error on connecting to my website. The error reported is:Safari cannot open the page because cannot establish a secure connection to the server.How can resolve this?
asked May 3 Humaira ahmed 50.7k points
0 votes
1 answer 11 views
11 views
Problem: This certificate has an invalid issuer?
asked Jul 24 Mezbah 130k points
0 votes
1 answer 27 views
27 views
Problem: I'm receiving many alert from iPhone and Mac users says receiving error on connecting to my website. The error reported is: Safari cannot open the page because cannot establish a secure connection to the server The site has a valid certificate, and use TLS 1.2. ... 't have an iPhone so I cannot test and debug the problem. The site address is: www.chicaj.com Any help is very appreciated
asked May 4 anika11 32.2k points
0 votes
1 answer 13 views
13 views
Problem: Unknown ssl protocol error in connection?
asked Jul 18 Mezbah 130k points
0 votes
1 answer 5 views
5 views
Problem: Curl unknown ssl protocol error in connection.
asked Jul 7 Rada Gracelynn 104k points
0 votes
1 answer 15 views
15 views
Problem: My Request a certificate from a certificate authority in Keychain Access on Mac is taking too long to generate the certificate. How to fix this?
asked May 22 Junia Phoebe 83.8k points
0 votes
1 answer 264 views
264 views
Problem : I can push by clone project using ssh but it is not working for me getting following error server certificate verification failed. cafile: /etc/ssl/certs/ca-certificates.crt crlfile: none
asked Nov 12, 2019 peterlaw 6.9k points