aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-12-11 11:01:09 +0100
committerRichard Levitte <levitte@openssl.org>2020-12-17 12:02:08 +0100
commit6963979f5c0f95b2152ef74645faa7344e33284d (patch)
treeff97ca1102560458f90bc3e16db622055aec41fd /include
parente77c13f8b73ff937819d6551ddd616fe01b989d0 (diff)
downloadopenssl-6963979f5c0f95b2152ef74645faa7344e33284d.tar.gz
DECODER: Adjust the library context of keys in our decoders
Because decoders are coupled with keymgmts from the same provider, ours need to produce provider side keys the same way. Since our keymgmts create key data with the provider library context, so must our decoders. We solve with functions to adjust the library context of decoded keys, and use them. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13661)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/dh.h1
-rw-r--r--include/crypto/dsa.h1
-rw-r--r--include/crypto/ec.h1
-rw-r--r--include/crypto/ecx.h1
-rw-r--r--include/crypto/rsa.h1
5 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/dh.h b/include/crypto/dh.h
index 3afe16935f..290cc7c0d2 100644
--- a/include/crypto/dh.h
+++ b/include/crypto/dh.h
@@ -14,6 +14,7 @@
DH *dh_new_by_nid_ex(OSSL_LIB_CTX *libctx, int nid);
DH *dh_new_ex(OSSL_LIB_CTX *libctx);
+void ossl_dh_set0_libctx(DH *d, OSSL_LIB_CTX *libctx);
int dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits,
BN_GENCB *cb);
diff --git a/include/crypto/dsa.h b/include/crypto/dsa.h
index 759fa4cce4..775a83c1ea 100644
--- a/include/crypto/dsa.h
+++ b/include/crypto/dsa.h
@@ -15,6 +15,7 @@
#define DSA_PARAMGEN_TYPE_FIPS_186_2 1 /* Use legacy FIPS186-2 standard */
DSA *dsa_new_with_ctx(OSSL_LIB_CTX *libctx);
+void ossl_dsa_set0_libctx(DSA *d, OSSL_LIB_CTX *libctx);
int dsa_generate_ffc_parameters(DSA *dsa, int type, int pbits, int qbits,
BN_GENCB *cb);
diff --git a/include/crypto/ec.h b/include/crypto/ec.h
index 451a3751a1..087457fa50 100644
--- a/include/crypto/ec.h
+++ b/include/crypto/ec.h
@@ -61,6 +61,7 @@ int ec_key_private_check(const EC_KEY *eckey);
int ec_key_pairwise_check(const EC_KEY *eckey, BN_CTX *ctx);
OSSL_LIB_CTX *ec_key_get_libctx(const EC_KEY *eckey);
const char *ec_key_get0_propq(const EC_KEY *eckey);
+void ec_key_set0_libctx(EC_KEY *key, OSSL_LIB_CTX *libctx);
/* Backend support */
int ec_group_todata(const EC_GROUP *group, OSSL_PARAM_BLD *tmpl,
diff --git a/include/crypto/ecx.h b/include/crypto/ecx.h
index 4771df5fb6..df04cdb562 100644
--- a/include/crypto/ecx.h
+++ b/include/crypto/ecx.h
@@ -77,6 +77,7 @@ typedef struct ecx_key_st ECX_KEY;
size_t ecx_key_length(ECX_KEY_TYPE type);
ECX_KEY *ecx_key_new(OSSL_LIB_CTX *libctx, ECX_KEY_TYPE type, int haspubkey,
const char *propq);
+void ecx_key_set0_libctx(ECX_KEY *key, OSSL_LIB_CTX *libctx);
unsigned char *ecx_key_allocate_privkey(ECX_KEY *key);
void ecx_key_free(ECX_KEY *key);
int ecx_key_up_ref(ECX_KEY *key);
diff --git a/include/crypto/rsa.h b/include/crypto/rsa.h
index ede11cfd41..cb53b5dde6 100644
--- a/include/crypto/rsa.h
+++ b/include/crypto/rsa.h
@@ -51,6 +51,7 @@ const char *ossl_rsa_oaeppss_nid2name(int md);
RSA *ossl_rsa_new_with_ctx(OSSL_LIB_CTX *libctx);
OSSL_LIB_CTX *ossl_rsa_get0_libctx(RSA *r);
+void ossl_rsa_set0_libctx(RSA *r, OSSL_LIB_CTX *libctx);
int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes,
const STACK_OF(BIGNUM) *exps,