We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c3519e commit 74ef50eCopy full SHA for 74ef50e
src/we_aes_ccm.c
@@ -31,6 +31,9 @@
31
#define CCM_NONCE_MIN_SZ 7
32
#endif
33
34
+/* Default OpenSSL size for nonce. */
35
+#define CCM_NONCE_DEF_SZ 12
36
+
37
/* Older versions of OpenSSL don't define these. */
38
#ifndef EVP_CCM_TLS_EXPLICIT_IV_LEN
39
#define EVP_CCM_TLS_EXPLICIT_IV_LEN EVP_GCM_TLS_EXPLICIT_IV_LEN
@@ -639,7 +642,7 @@ static int we_init_aesccm_meth(EVP_CIPHER *cipher)
639
642
640
643
WOLFENGINE_ENTER(WE_LOG_CIPHER, "we_init_aesccm_meth");
641
644
- ret = EVP_CIPHER_meth_set_iv_length(cipher, CCM_NONCE_MAX_SZ);
645
+ ret = EVP_CIPHER_meth_set_iv_length(cipher, CCM_NONCE_DEF_SZ);
646
if (ret == 1) {
647
ret = EVP_CIPHER_meth_set_flags(cipher, AES_CCM_FLAGS);
648
}
0 commit comments