title: iOS 5 : https ( ASIHTTPRequest) stop working
body: <p>I got an app which use <strong>ASIHTTPRequest</strong>.</p>
  
  <p>I <strong>recompiled my app with iOS 5</strong> (sdk : 5.0 / xcode: 4.2 Build 4D199 ) and the <strong>https connections fail</strong> with error message (the same call with https disabled works fine):</p>
  
  <pre><code>Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0xa8e66e0 {NSUnderlyingError=0xa8ac6c0 "The operation couldn’t be completed. (OSStatus error -9844.)", NSLocalizedDescription=A connection failure occurred}
  </code></pre>
  
  <p>With debug log enabled:</p>
  
  <pre><code>[STATUS] Starting asynchronous request &lt;ASIFormDataRequest: 0xd96fc00&gt;
  
  [CONNECTION] Request &lt;ASIFormDataRequest: 0xd96fc00&gt; will not use a persistent connection
  
  [STATUS] Request &lt;ASIFormDataRequest: 0xd96fc00&gt;: Failed
  
  [CONNECTION] Request #(null) failed and will invalidate connection #(null)
  </code></pre>
  
  <p>I found this related post:
  <a href="https://devforums.apple.com/message/537440#537440" rel="nofollow">https://devforums.apple.com/message/537440#537440</a>
  which could explain my problem.</p>
  
  <p>based on the idea that iOS 5 prefer TLS 1.2, I try changing the setting kCFStreamSocketSecurityLevelTLSv1 in AIHTTPRequest.m
             
           </p>
  
  <pre><code>  NSDictionary *sslProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
                                       [NSNumber numberWithBool:YES],
  kCFStreamSSLAllowsExpiredCertificates,
                                       [NSNumber numberWithBool:YES], kCFStreamSSLAllowsAnyRoot,
                                       [NSNumber numberWithBool:NO],  kCFStreamSSLValidatesCertificateChain,
                                       kCFNull,kCFStreamSSLPeerName,
                                        kCFStreamSocketSecurityLevelTLSv1, kCFStreamSSLLevel,// my modif
                                       nil];
  </code></pre>
  
  <p>with no success. Maybe my modification is incorrect?</p>
  
  <p>Details:</p>
  
  <ul>
  <li>I got the ARC disabled </li>
  <li>I use libz.1.2.5.dylib</li>
  <li>I updated the ASIHTTPRequest a week ago.</li>
  </ul>
  
  <p>I do not know if the issue is a certificate story (like TLS version) or something else.</p>
  
  <p>any help/idea is welcome !</p>