• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SSLHandshake returns errSSLClosedAbort
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SSLHandshake returns errSSLClosedAbort


  • Subject: SSLHandshake returns errSSLClosedAbort
  • From: Apparao Mulpuri <email@hidden>
  • Date: Thu, 15 Jul 2010 19:23:05 -0700

Hi Folks,

I am trying to establish a SSL Connection and it was failing in SSLHandshake call and returning errSSLClosedAbort error without any clue. Here is my code snippet. I google a lot but couldn't find anything about this.

{               
        ret = SSLNewContext(false, &_ctx);
        if(ret)
        {
            printSslErrStr("SSLNewContext", ret);
           
            if(_ctx)
            {
                SSLDisposeContext(_ctx); 
            }   
        }
       
        ret = SSLSetProtocolVersion(_ctx, kTLSProtocol1Only);
        if(ret)
        {
            printSslErrStr("SSLSetProtocolVersion", ret);
            if(_ctx)
            {
                SSLDisposeContext(_ctx); 
            }           
        }
       
        ret = SSLSetConnection(_ctx, self);
        if(ret) {
            printSslErrStr("SSLSetConnection", ret);
            if(_ctx)
            {
                SSLDisposeContext(_ctx); 
            }           
        }
       
        ret = SSLSetIOFuncs(_ctx, ssl_read, ssl_write);
       
        if(ret) {
            printSslErrStr("SSLSetIOFuncs", ret);
            if(_ctx)
            {
                SSLDisposeContext(_ctx); 
            }           
        }
       
       
        ret = SSLSetAllowsExpiredCerts(_ctx, false);
        if(ret)
        {
            printSslErrStr("SSLSetAllowExpiredCerts", ret);
            if(_ctx)
            {
                SSLDisposeContext(_ctx); 
            }           
        }
       
        if(clientCerts)
        {
            ret = SSLSetCertificate(_ctx, clientCerts); //here I am passing CFArrayRef with self sign certificate
            if(ret) {
                printSslErrStr("SSLSetCertificate", ret);
                if(_ctx)
                {
                    SSLDisposeContext(_ctx); 
                }               
            }
        }
       
       
        ret = SSLGetSessionState(_ctx, &status);
        if (ret)
        {
            printSslErrStr("SSLSetConnection", ret);
            if(_ctx)
            {
                SSLDisposeContext(_ctx); 
            }               
        }
       
        NSLog(@"status: %d", status);
    }


    if (_ctx)
    {
        do
        {  
            ret = SSLHandshake(_ctx);
            printSslErrStr("establishSecureHandshake", ret);
            if(ret == errSSLWouldBlock)
            {
                NSLog(@"I/O would block (not fatal)");
            }
        } while (ret == errSSLWouldBlock);               
    }

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: CFHTTP SSL errors
  • Next by Date: HTTP Pipe lining communication in iPhone application
  • Previous by thread: Re: CFHTTP SSL errors
  • Next by thread: HTTP Pipe lining communication in iPhone application
  • Index(es):
    • Date
    • Thread