Re: SSL_pending() and SSL_ERROR_WANT_READ

2002-03-15 Thread Bodo Moeller
On Thu, Mar 14, 2002 at 01:00:46PM -0800, John Hughes wrote: > Since s->rstate is set to SSL_ST_READ_HEADER prior to record > decryption and decompression, wouldn't SSL_pending() still > incorrectly indicate that there is data ready to be read in cases > where either of these fail? I guess so, b

RE: SSL_pending() and SSL_ERROR_WANT_READ

2002-03-14 Thread John Hughes
Title: RE: SSL_pending() and SSL_ERROR_WANT_READ Bodo, Since s->rstate is set to SSL_ST_READ_HEADER prior to record decryption and decompression, wouldn't SSL_pending() still incorrectly indicate that there is data ready to be read in cases where either of these fail? John Hughes

Re: SSL_pending() and SSL_ERROR_WANT_READ

2002-03-14 Thread Bodo Moeller
John Hughes <[EMAIL PROTECTED]>: > I can confirm: There is a discrepancy between the SSL_pending() > manpage and the source. SSL_pending() returns rrec.length in > ssl3_pending() (as of 0.9.6a, we also verify that the SSL record > being processed is application data, else zero is returned). Thi

Re: SSL_pending() and SSL_ERROR_WANT_READ

2002-03-14 Thread Patrick Li
Title: RE: SSL_pending() and SSL_ERROR_WANT_READ Hi John, Lutz,   Thanks for your reply.  I can reproduce the SSL_pending() reporting non-zero but immediate call to SSL_read() returns WANT_READ.  Since SSL_read() will not block when using nonblocking socket, we should be safe to not rely on

RE: SSL_pending() and SSL_ERROR_WANT_READ

2002-03-13 Thread Shaw, George
Rescorla's excellent book. G. -Original Message- From: Patrick Li [mailto:[EMAIL PROTECTED]] Sent: 12 March 2002 20:35 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: SSL_pending() and SSL_ERROR_WANT_READ Hi, I am experiencing the followings when running my SSL client on nonblo

SSL_pending() and SSL_ERROR_WANT_READ

2002-03-13 Thread Patrick Li
Hi, I am experiencing the followings when running my SSL client on nonblocking sockets. 1. SSL_read() fails and SSL_get_error() returns SSL_ERROR_WANT_READ 2. my client program calls SSL_pending() and it returns non-zero. 3. since SSL_pending() is returning non zero, that is data available and