mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
fix: dtls13: use aes for record numbers encryption if using aes-ccm
This commit is contained in:
@ -269,14 +269,15 @@ static int Dtls13GetRnMask(WOLFSSL* ssl, const byte* ciphertext, byte* mask,
|
||||
else
|
||||
c = &ssl->dtlsRecordNumberDecrypt;
|
||||
|
||||
#ifdef HAVE_AESGCM
|
||||
if (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm) {
|
||||
#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM)
|
||||
if (ssl->specs.bulk_cipher_algorithm == wolfssl_aes_gcm ||
|
||||
ssl->specs.bulk_cipher_algorithm == wolfssl_aes_ccm) {
|
||||
|
||||
if (c->aes == NULL)
|
||||
return BAD_STATE_E;
|
||||
return wc_AesEncryptDirect(c->aes, mask, ciphertext);
|
||||
}
|
||||
#endif /* HAVE_AESGCM */
|
||||
#endif /* HAVE_AESGCM || HAVE_AESCCM */
|
||||
|
||||
#ifdef HAVE_CHACHA
|
||||
if (ssl->specs.bulk_cipher_algorithm == wolfssl_chacha) {
|
||||
|
Reference in New Issue
Block a user