git: d61effd38b51 - main - Use G_ELI_IVKEYLEN as the size of IV in the user test code.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Jan 2022 01:22:28 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=d61effd38b518edd58c29144805cfff235c0d704
commit d61effd38b518edd58c29144805cfff235c0d704
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-01-14 01:22:06 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-01-14 01:22:06 +0000
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
---
sys/geom/eli/g_eli_crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/geom/eli/g_eli_crypto.c b/sys/geom/eli/g_eli_crypto.c
index ca8170db7e4d..441bedb030b8 100644
--- a/sys/geom/eli/g_eli_crypto.c
+++ b/sys/geom/eli/g_eli_crypto.c
@@ -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);