summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-05-22 12:38:19 +1000
committerTomas Mraz <tomas@openssl.org>2021-05-28 14:29:13 +0200
commitf5d0c02cdcb49d31f07d82e36a113c118f4775ec (patch)
treea27f4c017ad5af16d40fa5d104cef8835440d9e9 /crypto
parentb9098d4edd48fd094afee82ed1e0324f5d247ace (diff)
downloadopenssl-new-f5d0c02cdcb49d31f07d82e36a113c118f4775ec.tar.gz
Add missing EVP_CTRL_CCM_SET_L control
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15416)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/evp_enc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index 143ae1b076..dc22d507a4 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -1073,6 +1073,12 @@ int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
return 0;
params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &sz);
break;
+ case EVP_CTRL_CCM_SET_L:
+ if (arg < 2 || arg > 8)
+ return 0;
+ sz = 15 - arg;
+ params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &sz);
+ break;
case EVP_CTRL_AEAD_SET_IV_FIXED:
params[0] = OSSL_PARAM_construct_octet_string(
OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED, ptr, sz);