Reset DTLS sequence number

This commit is contained in:
Juliusz Sosinowicz
2023-02-21 20:11:54 +01:00
parent a432502a98
commit f5f67f43d7
2 changed files with 4 additions and 2 deletions

View File

@ -66,6 +66,8 @@ void DtlsResetState(WOLFSSL* ssl)
#endif
ssl->keys.dtls_expected_peer_handshake_number = 0;
ssl->keys.dtls_handshake_number = 0;
ssl->keys.dtls_sequence_number_hi = 0;
ssl->keys.dtls_sequence_number_lo = 0;
/* Reset states */
ssl->options.serverState = NULL_STATE;

View File

@ -59319,7 +59319,7 @@ static void test_wolfSSL_dtls_send_ch_with_invalid_cookie(WOLFSSL* ssl)
}
#endif
static word32 test_wolfSSL_dtls_stateless_HashWOLFSSL(WOLFSSL* ssl)
static word32 test_wolfSSL_dtls_stateless_HashWOLFSSL(const WOLFSSL* ssl)
{
#ifndef NO_MD5
enum wc_HashType hashType = WC_HASH_TYPE_MD5;
@ -59332,7 +59332,7 @@ static word32 test_wolfSSL_dtls_stateless_HashWOLFSSL(WOLFSSL* ssl)
#endif
byte hashBuf[WC_MAX_DIGEST_SIZE];
wc_HashAlg hash;
TLSX* exts = ssl->extensions;
const TLSX* exts = ssl->extensions;
WOLFSSL sslCopy; /* Use a copy to omit certain fields */
HS_Hashes* hsHashes = ssl->hsHashes; /* Is re-allocated in
* InitHandshakeHashes */