From 773451a5dc3215728b06772282b3301d752bcd40 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Mon, 24 Jun 2024 12:11:57 -0400 Subject: [PATCH] ret will be set to 1 (WOLFSSL_SUCCESS), the rest checks for 'ret == 0' Need to use another type of return code --- src/internal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 247bd3f15..96bacadb0 100644 --- a/src/internal.c +++ b/src/internal.c @@ -36659,8 +36659,12 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, /* check for TLS_EMPTY_RENEGOTIATION_INFO_SCSV suite */ ret = TLSX_AddEmptyRenegotiationInfo(&ssl->extensions, ssl->heap); - if (ret != WOLFSSL_SUCCESS) + if (ret != WOLFSSL_SUCCESS) { + ret = SECURE_RENEGOTIATION_E; goto out; + } else { + ret = 0; + } extension = TLSX_Find(ssl->extensions, TLSX_RENEGOTIATION_INFO); if (extension) {