← Commit list

e7a5184fa1

Daniel Stenberg
Daniel Stenberg
2025-10-06
SUCCESS Duration: 263s

Subject

openssl: call SSL_get_error() with proper error

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vtls/openssl.c+4 -2
@@ -2169,14 +2169,16 @@ static CURLcode ossl_shutdown(struct Curl_cfilter *cf,
/* SSL should now have started the shutdown from our side. Since it
* was not complete, we are lacking the close notify from the server. */
if(send_shutdown && !(SSL_get_shutdown(octx->ssl) & SSL_SENT_SHUTDOWN)) {
+ int rc;
ERR_clear_error();
CURL_TRC_CF(data, cf, "send SSL close notify");
- if(SSL_shutdown(octx->ssl) == 1) {
+ rc = SSL_shutdown(octx->ssl);
+ if(rc == 1) {
CURL_TRC_CF(data, cf, "SSL shutdown finished");
*done = TRUE;
goto out;
}
- if(SSL_ERROR_WANT_WRITE == SSL_get_error(octx->ssl, nread)) {
+ if(SSL_ERROR_WANT_WRITE == SSL_get_error(octx->ssl, rc)) {
CURL_TRC_CF(data, cf, "SSL shutdown still wants to send");
connssl->io_need = CURL_SSL_IO_NEED_SEND;
goto out;