Server Side Secure Renegotiation

1. Fix spelling typo in a comment.
2. Correct the server's check of its secure renegotiation extension.
This commit is contained in:
John Safranek
2018-11-28 10:53:44 -08:00
parent 0abf7c4997
commit 69436b6d41
2 changed files with 8 additions and 10 deletions

View File

@@ -21119,7 +21119,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (IsEncryptionOn(ssl, 1)) if (IsEncryptionOn(ssl, 1))
sendSz += MAX_MSG_EXTRA; sendSz += MAX_MSG_EXTRA;
/* check for avalaible size */ /* check for available size */
if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
return ret; return ret;

View File

@@ -4349,16 +4349,10 @@ static int TLSX_SecureRenegotiation_Parse(WOLFSSL* ssl, byte* input,
if (isRequest) { if (isRequest) {
#ifndef NO_WOLFSSL_SERVER #ifndef NO_WOLFSSL_SERVER
if (ssl->secure_renegotiation == NULL) { if (ssl->secure_renegotiation == NULL) {
if (*input == 0) { /* already in error state */
ret = 0; WOLFSSL_MSG("server SCR not available");
}
else {
/* already in error state */
WOLFSSL_MSG("SCR client verify data present");
}
} }
else if (ssl->secure_renegotiation->enabled) { else if (!ssl->secure_renegotiation->enabled) {
if (*input == 0) { if (*input == 0) {
input++; /* get past size */ input++; /* get past size */
@@ -4366,6 +4360,10 @@ static int TLSX_SecureRenegotiation_Parse(WOLFSSL* ssl, byte* input,
TLSX_SetResponse(ssl, TLSX_RENEGOTIATION_INFO); TLSX_SetResponse(ssl, TLSX_RENEGOTIATION_INFO);
ret = 0; ret = 0;
} }
else {
/* already in error state */
WOLFSSL_MSG("SCR client verify data present");
}
} }
else if (*input == TLS_FINISHED_SZ) { else if (*input == TLS_FINISHED_SZ) {
input++; /* get past size */ input++; /* get past size */