skip the sanity check on a duplicate change cipher spec message in DTLS mode, they are allowed
This commit is contained in:
parent
e16ff73273
commit
106abb873f
@ -6686,6 +6686,22 @@ int ProcessReply(WOLFSSL* ssl)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check for duplicate CCS message in DTLS mode.
|
||||
* DTLS allows for duplicate messages, and it should be
|
||||
* skipped. */
|
||||
if (ssl->options.dtls &&
|
||||
ssl->msgsReceived.got_change_cipher) {
|
||||
|
||||
WOLFSSL_MSG("Duplicate ChangeCipher msg");
|
||||
if (ssl->curSize != 1) {
|
||||
WOLFSSL_MSG("Malicious or corrupted"
|
||||
" duplicate ChangeCipher msg");
|
||||
return LENGTH_ERROR;
|
||||
}
|
||||
ssl->buffers.inputBuffer.idx++;
|
||||
break;
|
||||
}
|
||||
|
||||
ret = SanityCheckMsgReceived(ssl, change_cipher_hs);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user