From: Alessandro Chitarrini Date: Thu, 29 Aug 2024 10:59:54 +0000 (+0200) Subject: Fix inaccurate comment about default nonce length in demos/cipher/aesccm.c X-Git-Tag: openssl-3.1.8~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=575fcc6bd61d02248ab3edd8870b4469841ff713;p=thirdparty%2Fopenssl.git Fix inaccurate comment about default nonce length in demos/cipher/aesccm.c Fixes #25270 CLA: trivial Reviewed-by: Neil Horman Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25318) (cherry picked from commit f2b7a00fbb372b0ea32f2cfea865ab407641b1fa) --- diff --git a/demos/cipher/aesccm.c b/demos/cipher/aesccm.c index b70209be86c..6da6745baa8 100644 --- a/demos/cipher/aesccm.c +++ b/demos/cipher/aesccm.c @@ -94,7 +94,7 @@ int aes_ccm_encrypt(void) if ((cipher = EVP_CIPHER_fetch(libctx, "AES-192-CCM", propq)) == NULL) goto err; - /* Set nonce length if default 96 bits is not appropriate */ + /* Default nonce length for AES-CCM is 7 bytes (56 bits). */ params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_AEAD_IVLEN, &ccm_nonce_len); /* Set tag length */