]> git.ipfire.org Git - thirdparty/curl.git/commit
openssl: return -1 on error in the BIO callbacks
authorDaniel Stenberg <daniel@haxx.se>
Mon, 5 Dec 2022 10:29:38 +0000 (11:29 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 6 Dec 2022 08:50:29 +0000 (09:50 +0100)
commit5ec759247a9b9e7aae310f986439d8fcf1445977
tree32f97be8be751a593658647fc1830b41857d04cf
parent0ed8ff2d37e7d329c2a25b88f6b1d6803df6894c
openssl: return -1 on error in the BIO callbacks

BIO_read and BIO_write return negative numbers on error, including
retryable ones. A regression from 55807e6. Both branches should be
returning -1.

The APIs are patterned after POSIX read and write which, similarly,
return -1 on errors, not zero, with EAGAIN treated as an error.

Bug: https://github.com/curl/curl/issues/10013#issuecomment-1335308146
Reported-by: David Benjamin
Closes #10021
lib/vtls/openssl.c