Hi all,

I'm seeing weird OpenSSL behaviour and I suspect it's a bug in the library.

The problem is that SSL_write() sometimes returns SSL_ERROR_SSL with
errno equal to EAGAIN. Calling SSL_write() again seems to solve the
problem. I have the impression that SSL_write() should return
SSL_ERROR_WANT_WRITE in this situation.

Please take note that it's very difficult to reproduce the error. I
observe it only when sending a particular buffer over SSL and only for
some percentage of the tries. With other buffers, everything works
ordinarily.

Here is some more information about the error.
* the error queue contains "rsa routines:RSA_verify:wrong signature
length" and "asn1 encoding routines:ASN1_item_verify:EVP lib".
* the underlying socket is blocking
* I'm using OpenSSL 0.9.8h and Linux 2.6.18

Detailed information about the return values:

SSL_write() returned -1

SSL_get_error() returned 1
// the above corresponds to SSL_ERROR_SSL ("A failure in the SSL library
occurred, usually a protocol error. The OpenSSL error queue contains
more information on the error.")

ERR_get_error() returned 67596407
ERR_error_string() returned error:04077077:rsa routines:RSA_verify:wrong
signature length

ERR_get_error() returned 218910726
ERR_error_string() returned error:0D0C5006:asn1 encoding
routines:ASN1_item_verify:EVP lib

ERR_get_error() returned 0

errno is 11   // which corresponds to EAGAIN

Regards,
Aleksander Korzynski




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

Reply via email to