projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e58d9c8
)
ossl_recv: SSL_read() returning 0 is an error too
author
Mike Giancola
<mikegiancola@gmail.com>
Wed, 22 May 2013 21:42:33 +0000
(23:42 +0200)
committer
Daniel Stenberg
<daniel@haxx.se>
Wed, 22 May 2013 21:42:33 +0000
(23:42 +0200)
SSL_read can return 0 for "not successful", according to the open SSL
documentation: http://www.openssl.org/docs/ssl/SSL_read.html
lib/ssluse.c
patch
|
blob
|
history
diff --git
a/lib/ssluse.c
b/lib/ssluse.c
index 80fa119574f7940861e3ba855574ae59cd5cf833..36c38042ac964669a6e3b8b21e1dc223dd65ab4b 100644
(file)
--- a/
lib/ssluse.c
+++ b/
lib/ssluse.c
@@
-2595,7
+2595,7
@@
static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
nread = (ssize_t)SSL_read(conn->ssl[num].handle, buf, buffsize);
- if(nread < 0) {
+ if(nread <
=
0) {
/* failed SSL_read */
int err = SSL_get_error(conn->ssl[num].handle, (int)nread);