providers/common/include/prov/der_sm2.h
providers/common/include/prov/der_ml_dsa.h
providers/common/include/prov/der_hkdf.h
-providers/implementations/asymciphers/rsa_enc.c
-providers/implementations/asymciphers/sm2_enc.c
+providers/implementations/asymciphers/rsa_enc.inc
+providers/implementations/asymciphers/sm2_enc.inc
providers/implementations/exchange/dh_exch.c
providers/implementations/exchange/ecdh_exch.c
providers/implementations/exchange/ecx_exch.c
include/openssl/x509_acert.h \
include/openssl/x509_vfy.h \
include/crypto/bn_conf.h include/crypto/dso_conf.h \
- providers/implementations/asymciphers/rsa_enc.c \
- providers/implementations/asymciphers/sm2_enc.c \
+ providers/implementations/asymciphers/rsa_enc.inc \
+ providers/implementations/asymciphers/sm2_enc.inc \
providers/implementations/exchange/dh_exch.c \
providers/implementations/exchange/ecdh_exch.c \
providers/implementations/exchange/ecx_exch.c \
GENERATE[include/crypto/bn_conf.h]=include/crypto/bn_conf.h.in
GENERATE[include/crypto/dso_conf.h]=include/crypto/dso_conf.h.in
-DEPEND[providers/implementations/asymciphers/rsa_enc.c \
- providers/implementations/asymciphers/sm2_enc.c \
+DEPEND[providers/implementations/asymciphers/rsa_enc.inc \
+ 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/rands/seed_src_jitter.c \
providers/implementations/rands/test_rng.c \
include/openssl/core_names.h]=util/perl|OpenSSL/paramnames.pm
-GENERATE[providers/implementations/asymciphers/rsa_enc.c]=\
- providers/implementations/asymciphers/rsa_enc.c.in
-GENERATE[providers/implementations/asymciphers/sm2_enc.c]=\
- providers/implementations/asymciphers/sm2_enc.c.in
+GENERATE[providers/implementations/asymciphers/rsa_enc.inc]=\
+ providers/implementations/asymciphers/rsa_enc.inc.in
+GENERATE[providers/implementations/asymciphers/sm2_enc.inc]=\
+ providers/implementations/asymciphers/sm2_enc.inc.in
GENERATE[providers/implementations/exchange/dh_exch.c]=\
providers/implementations/exchange/dh_exch.c.in
GENERATE[providers/implementations/exchange/ecdh_exch.c]=\
* 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
#include "prov/providercommon.h"
#include "prov/securitycheck.h"
#include <stdlib.h>
+#include "providers/implementations/asymciphers/rsa_enc.inc"
static OSSL_FUNC_asym_cipher_newctx_fn rsa_newctx;
static OSSL_FUNC_asym_cipher_encrypt_init_fn rsa_encrypt_init;
return dstctx;
}
-{- produce_param_decoder('rsa_get_ctx_params',
- (['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST', 'oaep', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'int'],
- ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST', 'mgf1', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL', 'label', 'octet_ptr'],
- ['OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION', 'tlsver', 'uint'],
- ['OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION', 'negver', 'uint'],
- ['OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION', 'imrej', 'uint'],
- ['OSSL_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
- )); -}
-
static int rsa_get_ctx_params(void *vprsactx, OSSL_PARAM *params)
{
PROV_RSA_CTX *prsactx = (PROV_RSA_CTX *)vprsactx;
return 1;
}
-
static const OSSL_PARAM *rsa_gettable_ctx_params(ossl_unused void *vprsactx,
ossl_unused void *provctx)
{
return rsa_get_ctx_params_list;
}
-{- produce_param_decoder('rsa_set_ctx_params',
- (['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST', 'oaep', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS', 'oaep_pq', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'int'],
- ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST', 'mgf1', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS', 'mgf1_pq', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL', 'label', 'octet_string'],
- ['OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION', 'tlsver', 'uint'],
- ['OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION', 'negver', 'uint'],
- ['OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION', 'imrej', 'uint'],
- ['OSSL_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
- ['OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED', 'ind_pad', 'int', 'fips'],
- )); -}
-
static int rsa_set_ctx_params(void *vprsactx, const OSSL_PARAM params[])
{
PROV_RSA_CTX *prsactx = (PROV_RSA_CTX *)vprsactx;
--- /dev/null
+/*
+ * 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('rsa_get_ctx_params',
+ (['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST', 'oaep', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'int'],
+ ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST', 'mgf1', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL', 'label', 'octet_ptr'],
+ ['OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION', 'tlsver', 'uint'],
+ ['OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION', 'negver', 'uint'],
+ ['OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION', 'imrej', 'uint'],
+ ['OSSL_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
+ )); -}
+
+{- produce_param_decoder('rsa_set_ctx_params',
+ (['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST', 'oaep', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS', 'oaep_pq', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_PAD_MODE', 'pad', 'int'],
+ ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST', 'mgf1', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS', 'mgf1_pq', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL', 'label', 'octet_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION', 'tlsver', 'uint'],
+ ['OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION', 'negver', 'uint'],
+ ['OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION', 'imrej', 'uint'],
+ ['OSSL_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
+ ['OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED', 'ind_pad', 'int', 'fips'],
+ )); -}
* 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 "internal/deprecated.h"
#include "prov/implementations.h"
#include "prov/providercommon.h"
#include "prov/provider_util.h"
+#include "providers/implementations/asymciphers/sm2_enc.inc"
static OSSL_FUNC_asym_cipher_newctx_fn sm2_newctx;
static OSSL_FUNC_asym_cipher_encrypt_init_fn sm2_init;
return dstctx;
}
-{- produce_param_decoder('sm2_get_ctx_params',
- (['OSSL_ASYM_CIPHER_PARAM_DIGEST', 'digest', 'utf8_string'],
- )); -}
-
static int sm2_get_ctx_params(void *vpsm2ctx, OSSL_PARAM *params)
{
PROV_SM2_CTX *psm2ctx = (PROV_SM2_CTX *)vpsm2ctx;
return sm2_get_ctx_params_list;
}
-{- produce_param_decoder('sm2_set_ctx_params',
- (['OSSL_ASYM_CIPHER_PARAM_DIGEST', 'digest', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_PROPERTIES', 'propq', 'utf8_string'],
- ['OSSL_ASYM_CIPHER_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
- )); -}
-
static int sm2_set_ctx_params(void *vpsm2ctx, const OSSL_PARAM params[])
{
PROV_SM2_CTX *psm2ctx = (PROV_SM2_CTX *)vpsm2ctx;
--- /dev/null
+/*
+ * 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('sm2_get_ctx_params',
+ (['OSSL_ASYM_CIPHER_PARAM_DIGEST', 'digest', 'utf8_string'],
+ )); -}
+
+{- produce_param_decoder('sm2_set_ctx_params',
+ (['OSSL_ASYM_CIPHER_PARAM_DIGEST', 'digest', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_PROPERTIES', 'propq', 'utf8_string'],
+ ['OSSL_ASYM_CIPHER_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
+ )); -}