Hi Have u tried BIO_set_nbio(). If so what was your setup & experience. Maybe this is only for client side?
Robert ----- Original Message ----- From: "Tomas Svensson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 07, 2002 11:58 AM Subject: nonblocking sockets and FTP > Hi, > > I am adding SSL/TLS support to a unix FTP server that is using > non-blocking sockets but I have two problems... maybe someone can tell > me what I am doing wrong: > > 1) Non-blocking SSL_accept() > > SSL_accept() always returns -1 and SSL_ERROR_WANT_READ (via > SSL_get_error()) but when I do SSL_read() in response to the first > error, it is is also returning SSL_ERROR_WANT_READ which doesn't make > much sense to me. It will do this over and over until the handshake > is complete. > > I don't see how i can monitor the SSL_accept() with select() as it > says in the manpage/FAQ either, when the client has started the > negotiation I can see that the socket has data to read but thats about > all I can use it for. > > 2) SSL_accept() with SSL FTP data connection and Win32 clients. > > When setting up a SSL FTP data connection, I use SSL_accept() on the > connected socket like I do with the FTP control connection (in > problem 1 above), but when I'm using the Win32 clients Igloo FTP or > WS_FTP they never complete the negotiation in the SSL_accept(). If I > set the socket to blocking then it will block in SSL_accept forever > when using these clients. If i use lftp (on freebsd) then it connects > without problems. > > What does work with the Win32 clients is to use SSL_set_accept_state() > and call SSL_write or SSL_read until they report that the handshake is > successful. > > Anyone got some hints? > > -Tomas > > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List [EMAIL PROTECTED] > Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
