'An SSL error has occurred and a secure connection to the server cannot be made' with verified certificate
<p>I get the following error message (which is identical every try)</p>

<blockquote>
  <p>2016-07-20 20:09:28.013 MyApp[1140:374263] CFNetwork SSLHandshake failed (-9806)
  2016-07-20 20:09:28.014 MyApp[1140:374263] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)
  error=Optional(Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9806, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x154dda750 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9806, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9806}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=<a href="https://example.com:8080/api/login" rel="noreferrer">https://example.com:8080/api/login</a>, NSErrorFailingURLStringKey=<a href="https://example.com:8080/api/login" rel="noreferrer">https://example.com:8080/api/login</a>, _kCFStreamErrorDomainKey=3})</p>
</blockquote>

<p>The certificate is a validated one provided by letsencrypt. I have tested my web server configuration over and over, and everything seems to be like it should.</p>

<p>Running the command <code>openssl s_client -connect example.com:8080/api/login -tls1_2</code> gives all the expected results:</p>

<p>-It verifies the authority as <code>DST Root CA X3</code>, which is included in <a href="https://support.apple.com/en-us/HT205205" rel="noreferrer">Apples root CA list</a></p>

<p>-The return is code is <code>Verify return code: 0 (ok)</code></p>

<p>I have also run several ssl diagnostic tool websites such as <a href="http://www.digicert.com" rel="noreferrer" title="digicert">digicert</a>, which has given no error results.</p>

<hr>

<p>I can load the domain from Safari ON the iOS device, as well as chrome from my computer without having to accept "untrusted certificates". </p>

<p>Any suggestions?</p>