From 6963979f5c0f95b2152ef74645faa7344e33284d Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 11 Dec 2020 11:01:09 +0100 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/13661) --- crypto/dsa/dsa_lib.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crypto/dsa/dsa_lib.c') diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c index 4a9f572edd..df9dd73dfd 100644 --- a/crypto/dsa/dsa_lib.c +++ b/crypto/dsa/dsa_lib.c @@ -247,6 +247,11 @@ int DSA_up_ref(DSA *r) return ((i > 1) ? 1 : 0); } +void ossl_dsa_set0_libctx(DSA *d, OSSL_LIB_CTX *libctx) +{ + d->libctx = libctx; +} + void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { -- cgit v1.2.3