]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix test_CMAC_keygen
authorMatt Caswell <matt@openssl.org>
Mon, 11 Oct 2021 12:12:49 +0000 (13:12 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 22 Oct 2021 07:43:27 +0000 (08:43 +0100)
Make sure we correctly pass through the size of the buffer to
EVP_DigestSignFinal

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16789)

test/evp_extra_test.c

index 33c5a5b7e6019bd8855f53f84b8359bf845e5bcc..b241387b5ead2a10c6b3858450581e25ee692f45 100644 (file)
@@ -2070,7 +2070,7 @@ static int get_cmac_val(EVP_PKEY *pkey, unsigned char *mac)
 {
     EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
     const char msg[] = "Hello World";
-    size_t maclen;
+    size_t maclen = AES_BLOCK_SIZE;
     int ret = 1;
 
     if (!TEST_ptr(mdctx)