mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
skip the sanity check on a duplicate change cipher spec message in DTLS mode, they are allowed
This commit is contained in:
@@ -6686,6 +6686,22 @@ int ProcessReply(WOLFSSL* ssl)
|
|||||||
}
|
}
|
||||||
#endif
|
#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);
|
ret = SanityCheckMsgReceived(ssl, change_cipher_hs);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user