aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2019-02-25 18:00:14 +0000
committerEnji Cooper <ngie@FreeBSD.org>2019-02-25 18:00:14 +0000
commit18b18078f267ba10cf14348bc333f2f81818f472 (patch)
treed03b31ad4e3cf6986a85a0428716247584718902 /tools
parent7b1136bd5927731f58fa3d223cc3c2ccb58e3320 (diff)
parentf4f53f2b4dd3cf39ab43621adb2c73acfdad3ae4 (diff)
downloadsrc-18b18078f267ba10cf14348bc333f2f81818f472.tar.gz
src-18b18078f267ba10cf14348bc333f2f81818f472.zip
Notes
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/crypto/cryptocheck.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c
index 47c6bc0cfcf3..8f35c6b7e345 100644
--- a/tools/tools/crypto/cryptocheck.c
+++ b/tools/tools/crypto/cryptocheck.c
@@ -1185,6 +1185,9 @@ openssl_ccm_encrypt(struct alg *alg, const EVP_CIPHER *cipher, const char *key,
if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1)
errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name,
size, ERR_error_string(ERR_get_error(), NULL));
+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, iv_len, NULL) != 1)
+ errx(1, "OpenSSL %s (%zu) setting iv length failed: %s", alg->name,
+ size, ERR_error_string(ERR_get_error(), NULL));
if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, AES_CBC_MAC_HASH_LEN, NULL) != 1)
errx(1, "OpenSSL %s (%zu) setting tag length failed: %s", alg->name,
size, ERR_error_string(ERR_get_error(), NULL));