What does it mean when SSLRead returns errSSLServerAuthCompleted?

Chrome’s enabling the kSSLSessionOptionBreakOnServerAuthFlag option to SecureTransport. As expected, I see the status code errSSLServerAuthCompleted being returned from SSLHandshake after the server cert is sent; then we call SSLHandshake again and get noErr.

However, now I’m trying to connect to myopenid.com’s client-cert login and I’m seeing weird behavior. After the handshake completes with noErr, the first call to SSLRead returns errSSLServerAuthCompleted. The current code interprets that as an unknown fatal error, but even if I modify it to ignore it, the connection still aborts.

I think what’s happening is that the server wants to renegotiate (and ask for the client cert). But the OpenTransport docs don’t talk about renegotiation anywhere — they just say that after SSLHandshake returns noErr the connection is ready to use for sending and receiving data. Is that wrong? Am I expected to call SSLHandshake again if I get errSSLServerAuthCompleted back from SSLRead?

—Jens

PS: This is happening on 10.5.8. SSLSetSessionOption isn’t declared in the 10.5 SDK but we’re checking for the existence of the symbol dynamically.

Share and Enjoy:
  • Print
  • email
  • PDF
  • Digg
  • Facebook
  • LinkedIn
  • Twitter
  • Live
  • Yahoo! Bookmarks
  • Google Bookmarks

Related posts:

  1. What does it mean when SSLRead returns errSSLServerAuthCompleted?
  2. NSDateFormatter returns nil
  3. Why CGPathAddCurveToPoint returns to the origin?
  4. kTISPropertyUnicodeKeyLayoutData Returns NULL
  5. AuthorizationExecuteWithPrivileges returns -2129264641???
  6. NSFullUserName() always returns the user name at app launch?
  7. LSOpenFromURLSpec() returns -10825 on Tiger
  8. Problem: -currentCommand returns nil during ‘open document’
  9. NSAttributedString always returns NO for -isEqualToAttributedString with attachments present?
  10. observeValueForKeyPath returns null in the change directory???

  1. Ken McLeod says:
  2. Jens Alfke says:

    On Feb 8, 2010, at 4:55 PM, Ken McLeod wrote:

  3. Jens Alfke says:

    On Feb 9, 2010, at 10:26 AM, I wrote:

  4. Ken McLeod says:
  5. Jens Alfke says:

    On Feb 9, 2010, at 11:59 AM, Ken McLeod wrote:

  6. Ken McLeod says:
  7. Wan-Teh Chang says:
  8. Ken McLeod says:

    Jens,

    If you set your client certificate (by calling SSLSetCertificate) prior to starting the handshake, rather than doing it later in response to an errSSLClientCertRequested result, does the connection succeed?

    I think I understand the issue now, but want to be clear on that point.

    -ken

    On Feb 10 2010 05:53 PM, Jens Alfke wrote:

  1. There are no trackbacks for this post yet.

Leave a Reply