]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add missing EVP_CTRL_CCM_SET_L control
authorShane Lontis <shane.lontis@oracle.com>
Sat, 22 May 2021 02:38:19 +0000 (12:38 +1000)
committerTomas Mraz <tomas@openssl.org>
Fri, 28 May 2021 12:29:13 +0000 (14:29 +0200)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15416)

crypto/evp/evp_enc.c

index 143ae1b076a802ab6aca5523bf67e997cca91ea0..dc22d507a4c1e296c121e10319f513535c98ce94 100644 (file)
@@ -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);