wolfssl: fix error check in shutdown

When trying to send the TLS shutdown, use the return code
to check for the cause.

Reported in Joshua's sarif data

Closes #18729
This commit is contained in:
Stefan Eissing 2025-09-25 13:11:58 +02:00 committed by Daniel Stenberg
parent 15b4b96188
commit dec661c81c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -1921,7 +1921,8 @@ static CURLcode wssl_shutdown(struct Curl_cfilter *cf,
* was not complete, we are lacking the close notify from the server. */
if(send_shutdown) {
wolfSSL_ERR_clear_error();
if(wolfSSL_shutdown(wctx->ssl) == 1) {
nread = wolfSSL_shutdown(wctx->ssl);
if(nread == 1) {
CURL_TRC_CF(data, cf, "SSL shutdown finished");
*done = TRUE;
goto out;