diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2019-02-25 18:00:14 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2019-02-25 18:00:14 +0000 |
commit | 18b18078f267ba10cf14348bc333f2f81818f472 (patch) | |
tree | d03b31ad4e3cf6986a85a0428716247584718902 /tools | |
parent | 7b1136bd5927731f58fa3d223cc3c2ccb58e3320 (diff) | |
parent | f4f53f2b4dd3cf39ab43621adb2c73acfdad3ae4 (diff) | |
download | src-18b18078f267ba10cf14348bc333f2f81818f472.tar.gz src-18b18078f267ba10cf14348bc333f2f81818f472.zip |
MFhead@r344527
Notes
Notes:
svn path=/projects/import-googletest-1.8.1/; revision=344528
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/crypto/cryptocheck.c | 3 |
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)); |