wolfssl: no double get_error() detail

Code was calling wolfSSL_get_error() on code that it had
already retrieved with the same function. Remove that.

Reported-by: Joshua Rogers
Closes #18940
This commit is contained in:
Stefan Eissing 2025-10-08 14:44:23 +02:00 committed by Daniel Stenberg
parent 1f11224232
commit ca789e09b5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -1632,11 +1632,10 @@ static CURLcode wssl_send_earlydata(struct Curl_cfilter *cf,
break;
default: {
char error_buffer[256];
int detail = wolfSSL_get_error(wssl->ssl, err);
CURL_TRC_CF(data, cf, "SSL send early data, error: '%s'(%d)",
wssl_strerror((unsigned long)err, error_buffer,
sizeof(error_buffer)),
detail);
err);
result = CURLE_SEND_ERROR;
break;
}
@ -1878,7 +1877,6 @@ static CURLcode wssl_shutdown(struct Curl_cfilter *cf,
char error_buffer[256];
int nread = -1, err;
size_t i;
int detail;
DEBUGASSERT(wctx);
if(!wctx->ssl || cf->shutdown) {
@ -1959,11 +1957,10 @@ static CURLcode wssl_shutdown(struct Curl_cfilter *cf,
connssl->io_need = CURL_SSL_IO_NEED_SEND;
break;
default:
detail = wolfSSL_get_error(wctx->ssl, err);
CURL_TRC_CF(data, cf, "SSL shutdown, error: '%s'(%d)",
wssl_strerror((unsigned long)err, error_buffer,
sizeof(error_buffer)),
detail);
err);
result = CURLE_RECV_ERROR;
break;
}