RE: [openssl.org #457] bug report: BIO_socket_nbio() can't set so cket to non-blocking

2003-01-31 Thread Magnus Lind via RT


 From: Richard Levitte via RT [mailto:[EMAIL PROTECTED]]
 
 Hmm, BIO_socket_ioctl() should really take a void* instead of 
 an unsigned long *.  Then, BIO_socket_nbio() should send a 
 pointer to an int instead of a pointe to a long.  The latter 
 can be done anyway and pushed through useing a cast (ugly), 
 or we could change that last argument type to 
 BIO_socket_ioctl(), but that breaks the API (at least at 
 source level).
 
 *sigh*

I have now also confirmed this bug to exist on 64-bit Solaris too.
Both solutions are viable in my opinion. The ugly cast avoids breaking
the api and the api breakage is very benign since it won't generate
warings on a c-compiler.

/Regards

Magnus Lind

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



[openssl.org #457] bug report: BIO_socket_nbio() can't set socket to non-blocking

2003-01-14 Thread Magnus Lind via RT

bug report: openssl

operating system: HP-UX11
openssl version 0.9.6b, 0.96g and probably 0.7 too.
configuration options:./Configure hpux64-parisc-cc  shared no-idea

Description:
BIO_socket_nbio() fails to set sockets to non-blocking mode.
The call succeeds but the socket is still blocking

I have noticed that BIO_socket_nbio() calls BIO_socket_ioctl() unsing FIONBIO.
This ioctl, according to it's man page, takes one argument: a pointer to int,
but the BIO_socket_ioctl() uses a pointer to long as the argument.

This will result in that the os will only read the 32 most significant bits of the
64 bit long value that is set to 0 or 1 by BIO_socket_nbio(). These bits are always
0 and the call will always set the socket to blocking mode.

(If I patch BIO_socket_ioctl() to send a pointer to int instead the calls to
BIO_socket_nbio() work as expected.)

Regards

/Magnus Lind

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]