title: How to debug CFNetwork SSLHandshake failed (-9824) in Mac Os X?
body: <p>My Mac Os X app needs to access different servers in Brazil and one of the servers seems to have an sslv3 issue. It seems that access thru MS Windows solutions is normal. I tried using Internet Explorer and it works. This is an example of what Firefox shows me:</p>
  
  <p><img src="https://i.stack.imgur.com/7UFeC.png" alt="Firefox result"></p>
  
  <p>I have written a sample app at <a href="http://www.idanfe.com/trustAuthenticationTester.zip" rel="nofollow noreferrer">http://www.idanfe.com/trustAuthenticationTester.zip</a> that demonstrates that method - (void)connection:(NSURLConnection *)aConnection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)aChallenge is not called at all when talking to the server <a href="https://nfe.sefaz.ce.gov.br/nfe2/services/NfeStatusServico2" rel="nofollow noreferrer">https://nfe.sefaz.ce.gov.br/nfe2/services/NfeStatusServico2</a>, but I works fine with server <a href="https://nfe.sefazvirtual.rs.gov.br/ws/NfeStatusServico/NfeStatusServico2" rel="nofollow noreferrer">https://nfe.sefazvirtual.rs.gov.br/ws/NfeStatusServico/NfeStatusServico2</a>. The purpose is to customize the server trust evaluation. But at this point it is not possible.</p>
  
  <p>These are the error I get:</p>
  
  <p>CFNetwork SSLHandshake failed (-9824)</p>
  
  <p>CFNetwork SSLHandshake failed (-9802)</p>
  
  <p>CFNetwork SSLHandshake failed (-9802)</p>
  
  <p>NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)</p>
  
  <p>Thanks.</p>