diff options
author | Bodo Möller <bodo@openssl.org> | 1999-06-07 14:49:47 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-06-07 14:49:47 +0200 |
commit | 3a66e306e45215b2dac68f66eb6b1012a94f17e5 (patch) | |
tree | b584da1cd39963f9025a6e8c48174b45c63e7038 /ssl/ssl_lib.c | |
parent | linux-sparc (diff) | |
download | openssl-3a66e306e45215b2dac68f66eb6b1012a94f17e5.tar.xz openssl-3a66e306e45215b2dac68f66eb6b1012a94f17e5.zip |
Comments added.
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index bf1c900129..816afb2830 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1396,6 +1396,15 @@ int SSL_get_error(SSL *s,int i) if (BIO_should_read(bio)) return(SSL_ERROR_WANT_READ); else if (BIO_should_write(bio)) + /* This one doesn't make too much sense ... We never try + * to write to the rbio, and an application program where + * rbio and wbio are separate couldn't even know what it + * should wait for. + * However if we ever set s->rwstate incorrectly + * (so that we have SSL_want_read(s) instead of + * SSL_want_write(s)) and rbio and wbio *are* the same, + * this test works around that bug; so it might be safer + * to keep it. */ return(SSL_ERROR_WANT_WRITE); else if (BIO_should_io_special(bio)) { @@ -1413,6 +1422,7 @@ int SSL_get_error(SSL *s,int i) if (BIO_should_write(bio)) return(SSL_ERROR_WANT_WRITE); else if (BIO_should_read(bio)) + /* See above (SSL_want_read(s) with BIO_should_write(bio)) */ return(SSL_ERROR_WANT_READ); else if (BIO_should_io_special(bio)) { |