Am 08.09.2009 um 19:59 schrieb Stephen Henson via RT:

>> [seggelm...@fh-muenster.de - Tue Sep 08 18:31:29 2009]:
>>
>> That's just a simple example. If you use blocking sockets, it doesn't
>> return until a ClientHello with a valid cookie has been received
>> (returns 1) or an error occurred (returns 0). If you use non-blocking
>> sockets, it always returns 0 on EAGAIN, so you can use select() to
>> only call it when there's data to process and it will return as soon
>> as there is nothing left.
>>
>
> Is there some reason you only return 0, 1 from the ctrl? I'm wondering
> why you can't just return the return value of SSL_accept() (is <= 0)  
> for
> consistency with similar calls.

Well, I was thinking of just making a difference between valid  
ClientHello received and everything else. Just returning the return  
value of SSL_accept() would be ok in case it's <= 0. Otherwise it  
returns 2 to differentiate the premature handshake routine exit  
because of listen from the regular handshake ending. So, also for  
consitency, the listen call should not return 2 but 1 then. However,  
when using listen the handhsake routine should never exit with 1,  
indicating a successful handshake. I'll submit an updated version of  
the patch tomorrow.

- Robin


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to