The certificate for this server is invalid

Hi Team, I had this error. What should I check to be sure the certificate is ok. Could you please recommend a block or book or tutorial that help me to understand how the certificate in iOS works. Thanks in advance.

<1> HTTP load failed, 0/0 bytes (error code: -1202 [3:-9813]) 2023-06-23 15:45:32.476192-0300 xxxx simu[50709:4219288] Task <05DCEFE2-BFB2-44EC-B2EB-F79D8DCFCF75>.<1> finished with error [-1202] Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xxxx..com.ar” which could put your confidential information at risk." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( "<cert(0x10b165600) s:xxxx..com.ar i: CA NoProd Intermedia xxxx xxxx>", "<cert(0x10b181400) s: CA NoProd Intermedia *** xxxx i: Root CA xxxx xxxx>", "<cert(0x10b028c00) s: Root CA *** xxxx i: Root CA xxxx xxxx>" ), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://hofficetoken.bancogalicia.com.ar/detect/public/registration/mobileServices.htm?code=6TMLTI5S, NSErrorFailingURLStringKey=https://xxxx..com.ar/detect/public/registration/mobileServices.htm?code=xxxxx, NSUnderlyingError=0x283d67930 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x280376bc0>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9813, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9813, kCFStreamPropertySSLPeerCertificates=( "<cert(0x10b165600) s: xxxx..com.ar i: CA NoProd Intermedia xx xx>", "<cert(0x10b181400) s: CA NoProd Intermedia *** *** i: Root CA *** ***>", "<cert(0x10b028c00) s: Root CA xxxx xxxx i: Root CA xxxx xxxx>"

Answered by aligned in 759336022

I'm seeing the same thing on a test server. Works with a python client, but not iOS.

Accepted Answer

I'm seeing the same thing on a test server. Works with a python client, but not iOS.

The certificate for this server is invalid
 
 
Q