cURL / Mailing Lists / curl-users / Single Mail

curl-users

[Bug #130007] Should wait for SSL_read() to succeed

From: <noreply_at_sourceforge.net>
Date: Wed, 24 Jan 2001 20:49:11 -0800

Bug #130007, was updated on 2001-Jan-24 20:49
Here is a current snapshot of the bug.

Project: curl
Category: https
Status: Open
Resolution: None
Bug Group: wrong behaviour
Priority: 5
Submitted by: nobody
Assigned to : nobody
Summary: Should wait for SSL_read() to succeed

Details: When accessing a client-certificate-authenticated page, curl
outputs no data even though the server indicates a proper transmission
(error code 200 and a >0 byte count in the server logs). The problem is
that curl_read() only calls SSL_read() once. The documentation at
http://www.openssl.org/docs/ssl/SSL_get_error.html indicates that
SSL_read() should be called until it no longer returns the error codes
SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE.

I changed the curl_read() code to call SSL_read() repeatedly up to a
maximum of 100 times until it works. In my tests, the first time failed
but the second time always worked.

Versions 7.4.1 and 7.5.2 both exhibited this bug. The bug did not appear
on most https transfers.

My environment:
client: Pentium 300 laptop running Linux 2.2.18 (RedHat), openssl
0.9.5a-1.6.x (also RedHat)
server: Pentium 75 running Linux 2.2.16 (RedHat), apache 1.3.14, mod_ssl
2.7.1, openssl 0.9.5a-1.6.x

Thanks.

Jeff Morrow
jmorrow_at_alum.mit.edu

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=130007&group_id=976
Received on 2001-01-25