From: Simo Sorce Date: Thu, 16 Oct 2025 19:48:07 +0000 (-0400) Subject: encode_decode: Use include file for generated code X-Git-Tag: 4.0-PRE-CLANG-FORMAT-WEBKIT~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b50a9a5ccd5da17ac767695c103178964750da;p=thirdparty%2Fopenssl.git encode_decode: Use include file for generated code Signed-off-by: Simo Sorce Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/28838) --- diff --git a/.gitignore b/.gitignore index b84c5403ba4..bdfca92a238 100644 --- a/.gitignore +++ b/.gitignore @@ -91,13 +91,13 @@ providers/implementations/asymciphers/sm2_enc.inc providers/implementations/exchange/dh_exch.c providers/implementations/exchange/ecdh_exch.c providers/implementations/exchange/ecx_exch.c -providers/implementations/encode_decode/decode_der2key.c -providers/implementations/encode_decode/decode_epki2pki.c -providers/implementations/encode_decode/decode_pem2der.c -providers/implementations/encode_decode/decode_pvk2key.c -providers/implementations/encode_decode/decode_spki2typespki.c -providers/implementations/encode_decode/encode_key2any.c -providers/implementations/encode_decode/encode_key2ms.c +providers/implementations/encode_decode/decode_der2key.inc +providers/implementations/encode_decode/decode_epki2pki.inc +providers/implementations/encode_decode/decode_pem2der.inc +providers/implementations/encode_decode/decode_pvk2key.inc +providers/implementations/encode_decode/decode_spki2typespki.inc +providers/implementations/encode_decode/encode_key2any.inc +providers/implementations/encode_decode/encode_key2ms.inc providers/implementations/kdfs/argon2.c providers/implementations/kdfs/hkdf.c providers/implementations/kdfs/hmacdrbg_kdf.c diff --git a/build.info b/build.info index 3109435db0e..6f28022673d 100644 --- a/build.info +++ b/build.info @@ -53,13 +53,13 @@ DEPEND[]=include/openssl/asn1.h \ providers/implementations/exchange/dh_exch.c \ providers/implementations/exchange/ecdh_exch.c \ providers/implementations/exchange/ecx_exch.c \ - providers/implementations/encode_decode/decode_der2key.c \ - providers/implementations/encode_decode/decode_epki2pki.c \ - providers/implementations/encode_decode/decode_pem2der.c \ - providers/implementations/encode_decode/decode_pvk2key.c \ - providers/implementations/encode_decode/decode_spki2typespki.c \ - providers/implementations/encode_decode/encode_key2any.c \ - providers/implementations/encode_decode/encode_key2ms.c \ + providers/implementations/encode_decode/decode_der2key.inc \ + providers/implementations/encode_decode/decode_epki2pki.inc \ + providers/implementations/encode_decode/decode_pem2der.inc \ + providers/implementations/encode_decode/decode_pvk2key.inc \ + providers/implementations/encode_decode/decode_spki2typespki.inc \ + providers/implementations/encode_decode/encode_key2any.inc \ + providers/implementations/encode_decode/encode_key2ms.inc \ providers/implementations/kdfs/argon2.c \ providers/implementations/kdfs/hkdf.c \ providers/implementations/kdfs/hmacdrbg_kdf.c \ @@ -171,13 +171,13 @@ DEPEND[providers/implementations/asymciphers/rsa_enc.inc \ providers/implementations/exchange/dh_exch.c \ providers/implementations/exchange/ecdh_exch.c \ providers/implementations/exchange/ecx_exch.c \ - providers/implementations/encode_decode/decode_der2key.c \ - providers/implementations/encode_decode/decode_epki2pki.c \ - providers/implementations/encode_decode/decode_pem2der.c \ - providers/implementations/encode_decode/decode_pvk2key.c \ - providers/implementations/encode_decode/decode_spki2typespki.c \ - providers/implementations/encode_decode/encode_key2any.c \ - providers/implementations/encode_decode/encode_key2ms.c \ + providers/implementations/encode_decode/decode_der2key.inc \ + providers/implementations/encode_decode/decode_epki2pki.inc \ + providers/implementations/encode_decode/decode_pem2der.inc \ + providers/implementations/encode_decode/decode_pvk2key.inc \ + providers/implementations/encode_decode/decode_spki2typespki.inc \ + providers/implementations/encode_decode/encode_key2any.inc \ + providers/implementations/encode_decode/encode_key2ms.inc \ providers/implementations/kdfs/argon2.c \ providers/implementations/kdfs/hkdf.c \ providers/implementations/kdfs/hmacdrbg_kdf.c \ @@ -261,20 +261,20 @@ GENERATE[providers/implementations/exchange/ecdh_exch.c]=\ providers/implementations/exchange/ecdh_exch.c.in GENERATE[providers/implementations/exchange/ecx_exch.c]=\ providers/implementations/exchange/ecx_exch.c.in -GENERATE[providers/implementations/encode_decode/decode_der2key.c]=\ - providers/implementations/encode_decode/decode_der2key.c.in -GENERATE[providers/implementations/encode_decode/decode_epki2pki.c]=\ - providers/implementations/encode_decode/decode_epki2pki.c.in -GENERATE[providers/implementations/encode_decode/decode_pem2der.c]=\ - providers/implementations/encode_decode/decode_pem2der.c.in -GENERATE[providers/implementations/encode_decode/decode_pvk2key.c]=\ - providers/implementations/encode_decode/decode_pvk2key.c.in -GENERATE[providers/implementations/encode_decode/decode_spki2typespki.c]=\ - providers/implementations/encode_decode/decode_spki2typespki.c.in -GENERATE[providers/implementations/encode_decode/encode_key2any.c]=\ - providers/implementations/encode_decode/encode_key2any.c.in -GENERATE[providers/implementations/encode_decode/encode_key2ms.c]=\ - providers/implementations/encode_decode/encode_key2ms.c.in +GENERATE[providers/implementations/encode_decode/decode_der2key.inc]=\ + providers/implementations/encode_decode/decode_der2key.inc.in +GENERATE[providers/implementations/encode_decode/decode_epki2pki.inc]=\ + providers/implementations/encode_decode/decode_epki2pki.inc.in +GENERATE[providers/implementations/encode_decode/decode_pem2der.inc]=\ + providers/implementations/encode_decode/decode_pem2der.inc.in +GENERATE[providers/implementations/encode_decode/decode_pvk2key.inc]=\ + providers/implementations/encode_decode/decode_pvk2key.inc.in +GENERATE[providers/implementations/encode_decode/decode_spki2typespki.inc]=\ + providers/implementations/encode_decode/decode_spki2typespki.inc.in +GENERATE[providers/implementations/encode_decode/encode_key2any.inc]=\ + providers/implementations/encode_decode/encode_key2any.inc.in +GENERATE[providers/implementations/encode_decode/encode_key2ms.inc]=\ + providers/implementations/encode_decode/encode_key2ms.inc.in GENERATE[providers/implementations/kdfs/argon2.c]=\ providers/implementations/kdfs/argon2.c.in GENERATE[providers/implementations/kdfs/hkdf.c]=\ diff --git a/providers/implementations/encode_decode/decode_der2key.c.in b/providers/implementations/encode_decode/decode_der2key.c similarity index 99% rename from providers/implementations/encode_decode/decode_der2key.c.in rename to providers/implementations/encode_decode/decode_der2key.c index 22e7ad58030..d39301a0f79 100644 --- a/providers/implementations/encode_decode/decode_der2key.c.in +++ b/providers/implementations/encode_decode/decode_der2key.c @@ -6,9 +6,6 @@ * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -{- -use OpenSSL::paramnames qw(produce_param_decoder); --} /* * low level APIs are deprecated for public use, but still ok for @@ -47,6 +44,7 @@ use OpenSSL::paramnames qw(produce_param_decoder); #include "internal/nelem.h" #include "prov/ml_dsa_codecs.h" #include "prov/ml_kem_codecs.h" +#include "providers/implementations/encode_decode/decode_der2key.inc" #ifndef OPENSSL_NO_SLH_DSA typedef struct { @@ -172,10 +170,6 @@ der2key_newctx(void *provctx, const struct keytype_desc_st *desc) return ctx; } -{- produce_param_decoder('der2key_set_ctx_params', - (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], - )); -} - static const OSSL_PARAM *der2key_settable_ctx_params(ossl_unused void *provctx) { return der2key_set_ctx_params_list; diff --git a/providers/implementations/encode_decode/decode_der2key.inc.in b/providers/implementations/encode_decode/decode_der2key.inc.in new file mode 100644 index 00000000000..96b195564db --- /dev/null +++ b/providers/implementations/encode_decode/decode_der2key.inc.in @@ -0,0 +1,16 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the \"License\"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +{- produce_param_decoder('der2key_set_ctx_params', + (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], + )); -} diff --git a/providers/implementations/encode_decode/decode_epki2pki.c.in b/providers/implementations/encode_decode/decode_epki2pki.c similarity index 96% rename from providers/implementations/encode_decode/decode_epki2pki.c.in rename to providers/implementations/encode_decode/decode_epki2pki.c index 3c3b794d865..1c98377d3c1 100644 --- a/providers/implementations/encode_decode/decode_epki2pki.c.in +++ b/providers/implementations/encode_decode/decode_epki2pki.c @@ -6,9 +6,6 @@ * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -{- -use OpenSSL::paramnames qw(produce_param_decoder); --} #include #include @@ -27,6 +24,7 @@ use OpenSSL::paramnames qw(produce_param_decoder); #include "prov/decoders.h" #include "prov/implementations.h" #include "prov/endecoder_local.h" +#include "providers/implementations/encode_decode/decode_epki2pki.inc" static OSSL_FUNC_decoder_newctx_fn epki2pki_newctx; static OSSL_FUNC_decoder_freectx_fn epki2pki_freectx; @@ -58,10 +56,6 @@ static void epki2pki_freectx(void *vctx) OPENSSL_free(ctx); } -{- produce_param_decoder('epki2pki_set_ctx_params', - (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], - )); -} - static const OSSL_PARAM *epki2pki_settable_ctx_params(ossl_unused void *provctx) { return epki2pki_set_ctx_params_list; diff --git a/providers/implementations/encode_decode/decode_epki2pki.inc.in b/providers/implementations/encode_decode/decode_epki2pki.inc.in new file mode 100644 index 00000000000..064c6163a6a --- /dev/null +++ b/providers/implementations/encode_decode/decode_epki2pki.inc.in @@ -0,0 +1,16 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the \"License\"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +{- produce_param_decoder('epki2pki_set_ctx_params', + (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], + )); -} diff --git a/providers/implementations/encode_decode/decode_pem2der.c.in b/providers/implementations/encode_decode/decode_pem2der.c similarity index 96% rename from providers/implementations/encode_decode/decode_pem2der.c.in rename to providers/implementations/encode_decode/decode_pem2der.c index 7512da13092..5eba9fff391 100644 --- a/providers/implementations/encode_decode/decode_pem2der.c.in +++ b/providers/implementations/encode_decode/decode_pem2der.c @@ -6,9 +6,6 @@ * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -{- -use OpenSSL::paramnames qw(produce_param_decoder); --} /* * RSA low level APIs are deprecated for public use, but still ok for @@ -33,6 +30,7 @@ use OpenSSL::paramnames qw(produce_param_decoder); #include "prov/decoders.h" #include "prov/implementations.h" #include "prov/endecoder_local.h" +#include "providers/implementations/encode_decode/decode_pem2der.inc" static int read_pem(PROV_CTX *provctx, OSSL_CORE_BIO *cin, char **pem_name, char **pem_header, @@ -78,11 +76,6 @@ static void pem2der_freectx(void *vctx) OPENSSL_free(ctx); } -{- produce_param_decoder('pem2der_set_ctx_params', - (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], - ['OSSL_OBJECT_PARAM_DATA_STRUCTURE', 'ds', 'utf8_string'], - )); -} - static const OSSL_PARAM *pem2der_settable_ctx_params(ossl_unused void *provctx) { return pem2der_set_ctx_params_list; diff --git a/providers/implementations/encode_decode/decode_pem2der.inc.in b/providers/implementations/encode_decode/decode_pem2der.inc.in new file mode 100644 index 00000000000..20d7e008333 --- /dev/null +++ b/providers/implementations/encode_decode/decode_pem2der.inc.in @@ -0,0 +1,17 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the \"License\"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +{- produce_param_decoder('pem2der_set_ctx_params', + (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], + ['OSSL_OBJECT_PARAM_DATA_STRUCTURE', 'ds', 'utf8_string'], + )); -} diff --git a/providers/implementations/encode_decode/decode_pvk2key.c.in b/providers/implementations/encode_decode/decode_pvk2key.c similarity index 97% rename from providers/implementations/encode_decode/decode_pvk2key.c.in rename to providers/implementations/encode_decode/decode_pvk2key.c index 8dfd57bb0d8..b137288a521 100644 --- a/providers/implementations/encode_decode/decode_pvk2key.c.in +++ b/providers/implementations/encode_decode/decode_pvk2key.c @@ -6,9 +6,6 @@ * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -{- -use OpenSSL::paramnames qw(produce_param_decoder); --} /* * low level APIs are deprecated for public use, but still ok for @@ -35,6 +32,7 @@ use OpenSSL::paramnames qw(produce_param_decoder); #include "prov/bio.h" #include "prov/implementations.h" #include "prov/endecoder_local.h" +#include "providers/implementations/encode_decode/decode_pvk2key.inc" struct pvk2key_ctx_st; /* Forward declaration */ typedef int check_key_fn(void *, struct pvk2key_ctx_st *ctx); @@ -88,10 +86,6 @@ static void pvk2key_freectx(void *vctx) OPENSSL_free(ctx); } -{- produce_param_decoder('pvk2key_set_ctx_params', - (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], - )); -} - static const OSSL_PARAM *pvk2key_settable_ctx_params(ossl_unused void *provctx) { return pvk2key_set_ctx_params_list; diff --git a/providers/implementations/encode_decode/decode_pvk2key.inc.in b/providers/implementations/encode_decode/decode_pvk2key.inc.in new file mode 100644 index 00000000000..b53c6439727 --- /dev/null +++ b/providers/implementations/encode_decode/decode_pvk2key.inc.in @@ -0,0 +1,16 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the \"License\"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +{- produce_param_decoder('pvk2key_set_ctx_params', + (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], + )); -} diff --git a/providers/implementations/encode_decode/decode_spki2typespki.c.in b/providers/implementations/encode_decode/decode_spki2typespki.c similarity index 95% rename from providers/implementations/encode_decode/decode_spki2typespki.c.in rename to providers/implementations/encode_decode/decode_spki2typespki.c index 210f2f5efde..aec17455d81 100644 --- a/providers/implementations/encode_decode/decode_spki2typespki.c.in +++ b/providers/implementations/encode_decode/decode_spki2typespki.c @@ -6,9 +6,6 @@ * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -{- -use OpenSSL::paramnames qw(produce_param_decoder); --} #include #include @@ -25,6 +22,7 @@ use OpenSSL::paramnames qw(produce_param_decoder); #include "prov/decoders.h" #include "prov/implementations.h" #include "prov/endecoder_local.h" +#include "providers/implementations/encode_decode/decode_spki2typespki.inc" static OSSL_FUNC_decoder_newctx_fn spki2typespki_newctx; static OSSL_FUNC_decoder_freectx_fn spki2typespki_freectx; @@ -57,10 +55,6 @@ static void spki2typespki_freectx(void *vctx) OPENSSL_free(ctx); } -{- produce_param_decoder('spki2typespki_set_ctx_params', - (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], - )); -} - static const OSSL_PARAM *spki2typespki_settable_ctx_params(ossl_unused void *provctx) { return spki2typespki_set_ctx_params_list; diff --git a/providers/implementations/encode_decode/decode_spki2typespki.inc.in b/providers/implementations/encode_decode/decode_spki2typespki.inc.in new file mode 100644 index 00000000000..69f7124675e --- /dev/null +++ b/providers/implementations/encode_decode/decode_spki2typespki.inc.in @@ -0,0 +1,16 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the \"License\"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +{- produce_param_decoder('spki2typespki_set_ctx_params', + (['OSSL_DECODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], + )); -} diff --git a/providers/implementations/encode_decode/encode_key2any.c.in b/providers/implementations/encode_decode/encode_key2any.c similarity index 99% rename from providers/implementations/encode_decode/encode_key2any.c.in rename to providers/implementations/encode_decode/encode_key2any.c index d293f2256eb..c9945a54829 100644 --- a/providers/implementations/encode_decode/encode_key2any.c.in +++ b/providers/implementations/encode_decode/encode_key2any.c @@ -6,9 +6,6 @@ * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -{- -use OpenSSL::paramnames qw(produce_param_decoder); --} /* * Low level APIs are deprecated for public use, but still ok for internal use. @@ -44,6 +41,7 @@ use OpenSSL::paramnames qw(produce_param_decoder); #include "prov/endecoder_local.h" #include "prov/ml_dsa_codecs.h" #include "prov/ml_kem_codecs.h" +#include "providers/implementations/encode_decode/encode_key2any.inc" #if defined(OPENSSL_NO_DH) && defined(OPENSSL_NO_DSA) && defined(OPENSSL_NO_EC) # define OPENSSL_NO_KEYPARAMS @@ -72,7 +70,6 @@ typedef int key_to_der_fn(BIO *out, const void *key, OSSL_i2d_of_void_ctx *k2d, KEY2ANY_CTX *ctx); typedef int write_bio_of_void_fn(BIO *bp, const void *x); - /* Free the blob allocated during key_to_paramstring_fn */ static void free_asn1_data(int type, void *data) { @@ -162,7 +159,6 @@ static X509_PUBKEY *key_to_pubkey(const void *key, int key_nid, /* The final X509_PUBKEY */ X509_PUBKEY *xpk = NULL; - if ((xpk = X509_PUBKEY_new()) == NULL || (derlen = k2d(key, &der, (void *)ctx)) <= 0 || !X509_PUBKEY_set0_param(xpk, OBJ_nid2obj(key_nid), @@ -1137,12 +1133,6 @@ static void key2any_freectx(void *vctx) OPENSSL_free(ctx); } -{- produce_param_decoder('key2any_set_ctx_params', - (['OSSL_ENCODER_PARAM_CIPHER', 'cipher', 'utf8_string'], - ['OSSL_ENCODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], - ['OSSL_ENCODER_PARAM_SAVE_PARAMETERS', 'svprm', 'int'], - )); -} - static const OSSL_PARAM *key2any_settable_ctx_params(ossl_unused void *provctx) { return key2any_set_ctx_params_list; diff --git a/providers/implementations/encode_decode/encode_key2any.inc.in b/providers/implementations/encode_decode/encode_key2any.inc.in new file mode 100644 index 00000000000..6fe9688d4ed --- /dev/null +++ b/providers/implementations/encode_decode/encode_key2any.inc.in @@ -0,0 +1,18 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the \"License\"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +{- produce_param_decoder('key2any_set_ctx_params', + (['OSSL_ENCODER_PARAM_CIPHER', 'cipher', 'utf8_string'], + ['OSSL_ENCODER_PARAM_PROPERTIES', 'propq', 'utf8_string'], + ['OSSL_ENCODER_PARAM_SAVE_PARAMETERS', 'svprm', 'int'], + )); -} diff --git a/providers/implementations/encode_decode/encode_key2ms.c.in b/providers/implementations/encode_decode/encode_key2ms.c similarity index 97% rename from providers/implementations/encode_decode/encode_key2ms.c.in rename to providers/implementations/encode_decode/encode_key2ms.c index ec3f3050a79..d32dfaebf13 100644 --- a/providers/implementations/encode_decode/encode_key2ms.c.in +++ b/providers/implementations/encode_decode/encode_key2ms.c @@ -6,9 +6,6 @@ * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -{- -use OpenSSL::paramnames qw(produce_param_decoder); --} /* * Low level APIs are deprecated for public use, but still ok for internal use. @@ -31,6 +28,7 @@ use OpenSSL::paramnames qw(produce_param_decoder); #include "prov/bio.h" #include "prov/provider_ctx.h" #include "prov/endecoder_local.h" +#include "providers/implementations/encode_decode/encode_key2ms.inc" struct key2ms_ctx_st { PROV_CTX *provctx; @@ -93,10 +91,6 @@ static void key2ms_freectx(void *vctx) OPENSSL_free(ctx); } -{- produce_param_decoder('key2pvk_set_ctx_params', - (['OSSL_ENCODER_PARAM_ENCRYPT_LEVEL', 'enclvl', 'int'], - )); -} - static const OSSL_PARAM *key2pvk_settable_ctx_params(ossl_unused void *provctx) { return key2pvk_set_ctx_params_list; diff --git a/providers/implementations/encode_decode/encode_key2ms.inc.in b/providers/implementations/encode_decode/encode_key2ms.inc.in new file mode 100644 index 00000000000..f926fa9bee7 --- /dev/null +++ b/providers/implementations/encode_decode/encode_key2ms.inc.in @@ -0,0 +1,16 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the \"License\"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +{- +use OpenSSL::paramnames qw(produce_param_decoder); +-} + +{- produce_param_decoder('key2pvk_set_ctx_params', + (['OSSL_ENCODER_PARAM_ENCRYPT_LEVEL', 'enclvl', 'int'], + )); -}