Hi,
i just have readed the decription of SSL_read() in openssl-0.9.7.

If count of bytes to read is higher than the data avaible to read,
the SSL_read will block if the underlying BIO is in blocking mode.
(IMHO that is the akutell situation in Apache/mod_ssl).

It is possible to make underlying BIO nonblocking...
(i have tried this with fcntl() just befor SSL_read-call)
But if underlying BIO is non-blocking the SSL_read will return
(unter the same circumstances as above) the -1 Errorcode and
SSL_ERROR_WANT_READ SSL-error. The mod_ssl(ssl_io_hook_read)
casts this Error as EINTR. The reaction of Apache on EINTR is
to recall of read operation (apache/buff.c/saferead_guts()).
This leads finally to dead loop (without timeout) beetwen Apache
and mod_ssl.

Perhaps, the mod_ssl schould check in which mode (blocking/nonblocking)
the underlying BIO is (f.e. with fcntl()), and do correspond pre-read-checking
(select() or nothing) and post-read-handling (EINTR-Casting oder nothing)...

What do you think about that?

Best regards
Dimitri
--

------------------------------------------------------------------------
Dimitri Rebrikov
*T-Systems GEI GmbH*
Projektentwickler
Postanschrift: Prager Stra�e 15, D-04103 Leipzig
Telefon:         (0341) 1275-439
Telefax:         (0341) 1275-333
E-Mail:          [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
Internet:         http://www.t-systems.com
------------------------------------------------------------------------

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to