From 09b6974ae99e9855b8622dba11b73594467226cc Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 24 Nov 2023 09:30:09 -0800 Subject: [PATCH] Fix for TLS v1.3 in non-blocking loosing return code from `SendBuffered`. Example: SendBuffered returns WANT_WRITE (-327) and sets ssl->error, then below it was doing `ssl->error = ret` where ret = 0. --- src/tls13.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls13.c b/src/tls13.c index ac24dda0e..738e9c1d0 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -11954,7 +11954,7 @@ int wolfSSL_connect_TLSv13(WOLFSSL* ssl) && ssl->error != WC_PENDING_E #endif ) { - if ((ssl->error = SendBuffered(ssl)) == 0) { + if ((ret = SendBuffered(ssl)) == 0) { if (ssl->fragOffset == 0 && !ssl->options.buildingMsg) { if (advanceState) { #ifdef WOLFSSL_DTLS13