Hi,
we're developing an iOS 9 app that connects to a server with REST web services over HTTPS with two-way SSL.
I've implemented the delegate to handle authentication and can see in the log file that it's called with NSURLAuthenticationMethodClientCertificate first and with NSURLAuthenticationMethodServerTrust afterwards. So this seems to work fine.
But afterwards, the request fails with one of two errors:
- NSURLErrorDomain Code=-1005 "The network connection was lost." (_kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4)
- NSPOSIXErrorDomain Code=54 "Connection reset by peer"
We use the default NSURLSession configuration and add the following 3 elements:
- kCFNetworkProxiesHTTPEnable: NSNumber(int: 1)
- kCFNetworkProxiesHTTPProxy: proxy host name
- kCFNetworkProxiesHTTPPort: NSNumber(int: 8080)
Unfortunately, it's not possible to switch the server from HTTPS to HTTP for debugging.
Does anybody have an idea what could cause the two errors above, or how we could further analyze the problem?
Thank you,
Andreas