summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-04-08 18:25:26 +0200
committerTomas Mraz <tomas@openssl.org>2021-04-15 09:19:39 +0200
commitb4f447c038c05260491eb880e4a9c420b476c119 (patch)
tree1f77cb414be14032b47264c1c98356c9398b4516 /include
parent4a9fe33c8e12f4fefae0471c0834f8e674dc7e4e (diff)
Add selection support to the provider keymgmt_dup function
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14793)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/dh.h2
-rw-r--r--include/crypto/dsa.h2
-rw-r--r--include/crypto/ec.h1
-rw-r--r--include/crypto/ecx.h2
-rw-r--r--include/crypto/evp.h2
-rw-r--r--include/crypto/rsa.h2
-rw-r--r--include/openssl/core_dispatch.h2
7 files changed, 7 insertions, 6 deletions
diff --git a/include/crypto/dh.h b/include/crypto/dh.h
index 8d5908549b..291e008c9c 100644
--- a/include/crypto/dh.h
+++ b/include/crypto/dh.h
@@ -56,6 +56,6 @@ int ossl_dh_kdf_X9_42_asn1(unsigned char *out, size_t outlen,
const unsigned char *ukm, size_t ukmlen,
const EVP_MD *md,
OSSL_LIB_CTX *libctx, const char *propq);
-DH *ossl_dh_dup(const DH *dh);
+DH *ossl_dh_dup(const DH *dh, int selection);
#endif /* OSSL_CRYPTO_DH_H */
diff --git a/include/crypto/dsa.h b/include/crypto/dsa.h
index 4fad9ab73e..ed0c887b83 100644
--- a/include/crypto/dsa.h
+++ b/include/crypto/dsa.h
@@ -43,6 +43,6 @@ int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key,
int *ret);
int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret);
int ossl_dsa_check_pairwise(const DSA *dsa);
-DSA *ossl_dsa_dup(const DSA *dsa);
+DSA *ossl_dsa_dup(const DSA *dsa, int selection);
#endif
diff --git a/include/crypto/ec.h b/include/crypto/ec.h
index c679fd8d11..80b5ce0735 100644
--- a/include/crypto/ec.h
+++ b/include/crypto/ec.h
@@ -79,6 +79,7 @@ int ossl_ec_group_set_params(EC_GROUP *group, const OSSL_PARAM params[]);
int ossl_ec_key_fromdata(EC_KEY *ecx, const OSSL_PARAM params[],
int include_private);
int ossl_ec_key_otherparams_fromdata(EC_KEY *ec, const OSSL_PARAM params[]);
+EC_KEY *ossl_ec_key_dup(const EC_KEY *key, int selection);
EC_KEY *ossl_ec_key_param_from_x509_algor(const X509_ALGOR *palg,
OSSL_LIB_CTX *libctx,
const char *propq);
diff --git a/include/crypto/ecx.h b/include/crypto/ecx.h
index fcb0bbde0f..82671a8f4d 100644
--- a/include/crypto/ecx.h
+++ b/include/crypto/ecx.h
@@ -83,7 +83,7 @@ void ossl_ecx_key_set0_libctx(ECX_KEY *key, OSSL_LIB_CTX *libctx);
unsigned char *ossl_ecx_key_allocate_privkey(ECX_KEY *key);
void ossl_ecx_key_free(ECX_KEY *key);
int ossl_ecx_key_up_ref(ECX_KEY *key);
-ECX_KEY *ossl_ecx_key_dup(const ECX_KEY *key);
+ECX_KEY *ossl_ecx_key_dup(const ECX_KEY *key, int selection);
int ossl_x25519(uint8_t out_shared_key[32], const uint8_t private_key[32],
const uint8_t peer_public_value[32]);
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index 5f48d38f98..15ef0ca79f 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -814,7 +814,7 @@ int evp_keymgmt_copy(const EVP_KEYMGMT *keymgmt,
void *keydata_to, const void *keydata_from,
int selection);
void *evp_keymgmt_dup(const EVP_KEYMGMT *keymgmt,
- const void *keydata_from);
+ const void *keydata_from, int selection);
/* Pulling defines out of C source files */
diff --git a/include/crypto/rsa.h b/include/crypto/rsa.h
index 8c6ce49a7d..f252363465 100644
--- a/include/crypto/rsa.h
+++ b/include/crypto/rsa.h
@@ -63,7 +63,7 @@ int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes,
int ossl_rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes,
STACK_OF(BIGNUM_const) *exps,
STACK_OF(BIGNUM_const) *coeffs);
-RSA *ossl_rsa_dup(const RSA *rsa);
+RSA *ossl_rsa_dup(const RSA *rsa, int selection);
int ossl_rsa_todata(RSA *rsa, OSSL_PARAM_BLD *bld, OSSL_PARAM params[]);
int ossl_rsa_fromdata(RSA *rsa, const OSSL_PARAM params[]);
diff --git a/include/openssl/core_dispatch.h b/include/openssl/core_dispatch.h
index 46278b4af6..bdec143566 100644
--- a/include/openssl/core_dispatch.h
+++ b/include/openssl/core_dispatch.h
@@ -603,7 +603,7 @@ OSSL_CORE_MAKE_FUNC(int, keymgmt_copy,
/* Dup function, constructor */
# define OSSL_FUNC_KEYMGMT_DUP 45
OSSL_CORE_MAKE_FUNC(void *, keymgmt_dup,
- (const void *keydata_from))
+ (const void *keydata_from, int selection))
/* Key Exchange */