Can someone confirm regarding this?

It seems like when used with non blocking socket BIO_do_connect always returns 1. The man page on the web says that it should return 1 only if the connection is established.

Regards,
Amar.

Frédéric Donnat wrote:

Hi all,

Any news about that?
Nothing seems have changed on the CVS.

Regards.

-----Original Message-----
From:   Claudiu Dragalina-Paraipan [mailto:[EMAIL PROTECTED]
Sent:   Fri 10/28/2005 3:07 PM
To:     openssl-dev@openssl.org
Cc:     
Subject:        BIO_do_connect does not connect (bug?)
Hello,

I have noticed that BIO_do_connect doesn't start the connection upon
call, instead the connection is established on the first BIO_puts, in
my case.
I am not sure if this is a bug or not, but I have traced it to
bss_conn.c, function conn_ctrl, line 470:

--- snip ---
case BIO_C_DO_STATE_MACHINE:
/* use this one to start the connection */
if (!(data->state != BIO_CONN_S_OK))
  ret=(long)conn_state(b,data);
else
  ret=1;
break;
--- snip ---

Shouldn't the condition be simply data->state != BIO_CONN_S_OK ?
Latter in the same file, in functions conn_read and conn_write a check
is made with the above condition, and if the condition is true
conn_state is called, which finally creates the socket and connects.

Thank you.

Regards,

--
Claudiu Dragalina-Paraipan
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]




______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to