diff --git a/src/internal.c b/src/internal.c index ff45f7d36..0ec0ec393 100644 --- a/src/internal.c +++ b/src/internal.c @@ -21119,7 +21119,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, if (IsEncryptionOn(ssl, 1)) sendSz += MAX_MSG_EXTRA; - /* check for avalaible size */ + /* check for available size */ if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) return ret; diff --git a/src/tls.c b/src/tls.c index a7f14de33..f932dfcec 100644 --- a/src/tls.c +++ b/src/tls.c @@ -4349,16 +4349,10 @@ static int TLSX_SecureRenegotiation_Parse(WOLFSSL* ssl, byte* input, if (isRequest) { #ifndef NO_WOLFSSL_SERVER if (ssl->secure_renegotiation == NULL) { - if (*input == 0) { - ret = 0; - } - else { - /* already in error state */ - WOLFSSL_MSG("SCR client verify data present"); - } + /* already in error state */ + WOLFSSL_MSG("server SCR not available"); } - else if (ssl->secure_renegotiation->enabled) { - + else if (!ssl->secure_renegotiation->enabled) { if (*input == 0) { input++; /* get past size */ @@ -4366,6 +4360,10 @@ static int TLSX_SecureRenegotiation_Parse(WOLFSSL* ssl, byte* input, TLSX_SetResponse(ssl, TLSX_RENEGOTIATION_INFO); ret = 0; } + else { + /* already in error state */ + WOLFSSL_MSG("SCR client verify data present"); + } } else if (*input == TLS_FINISHED_SZ) { input++; /* get past size */