diff options
author | Richard Levitte <levitte@openssl.org> | 2020-12-11 11:01:09 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-12-17 12:02:08 +0100 |
commit | 6963979f5c0f95b2152ef74645faa7344e33284d (patch) | |
tree | ff97ca1102560458f90bc3e16db622055aec41fd /crypto/dh | |
parent | MSBLOB & PVK: Make it possible to write EVP_PKEYs with provided internal key (diff) | |
download | openssl-6963979f5c0f95b2152ef74645faa7344e33284d.tar.xz openssl-6963979f5c0f95b2152ef74645faa7344e33284d.zip |
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 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index e687b04259..e8a66878ab 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -168,6 +168,11 @@ int DH_up_ref(DH *r) return ((i > 1) ? 1 : 0); } +void ossl_dh_set0_libctx(DH *d, OSSL_LIB_CTX *libctx) +{ + d->libctx = libctx; +} + #ifndef FIPS_MODULE int DH_set_ex_data(DH *d, int idx, void *arg) { |