3

i want to load my Url in web view that shows me error like as NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

Here i write my code like as

NSString *urlAddress = @"https://anyror.gujarat.gov.in/";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.revenueWeb loadRequest:requestObj];

I do googling for it and fine some solution like as add this code in info.plist

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>

then i added this code in my info.plist but it is not working.

None Of Above
  • 51
  • 1
  • 4
  • See [these search results](http://stackoverflow.com/search?q=%5Bios%5D+kCFStreamErrorDomainSSL+%27-9813%27+nsurlrequest). It seems to be related to certificates, not ATS. – rmaddy Oct 17 '15 at 16:04
  • This answer might help with your problem http://stackoverflow.com/a/20047835/1368032 – Tri Nguyen Jun 01 '16 at 05:28

1 Answers1

1

I can't view that site in Safari on OS X v10.9, either. It gives a certificate warning. Same with "openssl s_client".

Error 9813 is errSSLNoRootCert. This indicates that the certificate chain cannot be validated back to a known anchor. This usually means that the server is misconfigured, and is not providing a complete set the intermediate certificates between its cert and a trusted root cert.

See Technote 2232 for additional info.

dgatwood
  • 10,129
  • 1
  • 28
  • 49
  • This is helpful to know, but I don't think it really answers the original question. – Tri Nguyen Jun 01 '16 at 05:18
  • I see your link to info on Charles Proxy in the simulator. That could be the original poster's problem, but only if the original poster was trying to use an HTTPS proxy to debug a networking issue (which isn't indicated anywhere in the post). Chances are, it was a misconfigured server, either with missing intermediate certs or signed by an untrusted root cert from an authority that iOS no longer trusts. – dgatwood Jun 02 '16 at 17:14