0

I am requesting from iOS 9 device to https:// URL where iOS receiving error code -1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “example.com” which could put your confidential information at risk." Which already mentioned on

https://developer.apple.com/library/content/technotes/tn2232/_index.html#//apple_ref/doc/uid/DTS40012884-CH1-SECGLOSSARY

FYI : The same request is working on iOS 10 & 11 devices with 200 Ok Response. Also i have already handled the challenge methods in my HTTP Class using NSURLSession API.

Here Server is using self signed certificate.

Kapil_A
  • 125
  • 2
  • 15
  • Is this solution suitable for you https://stackoverflow.com/questions/19507207/how-do-i-accept-a-self-signed-ssl-certificate-using-ios-7s-nsurlsession-and-its ? – Alexander Feb 06 '18 at 19:55
  • @Alexander thank you i have checked the solution. But in my case this `- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler` delegate is not called.I directly got an NSURLDomainError (NSURLErrorServerCertificateUntrusted 1202) on requesting an https:// URL. I have further checked out the wireshak pcap found ssl handshaking issue. – Kapil_A Feb 07 '18 at 17:26
  • What about this one https://stackoverflow.com/questions/12447318/switching-from-http-to-https-invalid-certificate ? – Alexander Feb 07 '18 at 22:53
  • @Alexander I have referred your given solution. but it's no use for me as i cannot use the NSURLRequest Private API. – Kapil_A Feb 13 '18 at 10:17

0 Answers0