Posts

Post not yet marked as solved
1 Replies
1.5k Views
HiIm trying to make an app which will communicate with our multiple servers over HTTPS I'm using my company's own Root CA which is bundled in our app and ATS fully enabled (NSAllowsArbitraryLoads set to False).On network request I’m receiving an error (below) using TLSTool (--ats-diagnostics) to test the connection and reaching the following error (same as when running the app):```Default ATS Secure ConnectionATS Default ConnectionATS Dictionary:{}2019-04-23 12:18:18.450 nscurl[34429:2491536] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)Result : FAILError : Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( "<cert(0x7fa197833200) s: IT i: IT>"), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=<MY URL>, NSErrorFailingURLStringKey=<MY URL>, NSUnderlyingError=0x7fa196c2ad30 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x7fa196d1db50>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=( "<cert(0x7fa197833200) s: IT i: IT>")}}, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <75AEFFA7-BCF1-46C8-86E7-85E7A806A39D>.<1>"), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <75AEFFA7-BCF1-46C8-86E7-85E7A806A39D>.<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7fa196d1db50>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}```When Root CA Certificate is installed and trusted on the device then HTTPS communication with ATS enabled works without any error. But I don't want user to manually install and trust the Root CA on the device.I can’t allow an exception on specific domain since the app will be connected to multiple servers with the same certificateI want to upload the app to the App Store and don’t want to have an exception to all connections (NSAllowsArbitraryLoads set to true)
Posted
by rrr1981.
Last updated
.