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/rsa | |
parent | e77c13f8b73ff937819d6551ddd616fe01b989d0 (diff) |
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/rsa')
-rw-r--r-- | crypto/rsa/rsa_lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index 8e7ad45608..f4e3ff423e 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -194,6 +194,11 @@ OSSL_LIB_CTX *ossl_rsa_get0_libctx(RSA *r) return r->libctx; } +void ossl_rsa_set0_libctx(RSA *r, OSSL_LIB_CTX *libctx) +{ + r->libctx = libctx; +} + #ifndef FIPS_MODULE int RSA_set_ex_data(RSA *r, int idx, void *arg) { |