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.

This commit is contained in:
David Garske 2023-11-24 09:30:09 -08:00
parent dda72dc19c
commit 09b6974ae9

View File

@ -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