Use G_ELI_IVKEYLEN as the size of IV in the user test code.

IVs are not the size of keys as a general case.  Most often they are
the size of a single block.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33885
This commit is contained in:
John Baldwin 2022-01-13 17:22:06 -08:00
parent c7721958ff
commit d61effd38b

View File

@ -112,7 +112,7 @@ g_eli_crypto_cipher(u_int algo, int enc, u_char *data, size_t datasize,
{
EVP_CIPHER_CTX *ctx;
const EVP_CIPHER *type;
u_char iv[keysize];
u_char iv[G_ELI_IVKEYLEN];
int outsize;
assert(algo != CRYPTO_AES_XTS);