DECODER: Adjust the library context of keys in our decoders
authorRichard Levitte <levitte@openssl.org>
Fri, 11 Dec 2020 10:01:09 +0000 (11:01 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 17 Dec 2020 11:02:08 +0000 (12:02 +0100)
commit6963979f5c0f95b2152ef74645faa7344e33284d
treeff97ca1102560458f90bc3e16db622055aec41fd
parente77c13f8b73ff937819d6551ddd616fe01b989d0
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)
crypto/dh/dh_lib.c
crypto/dsa/dsa_lib.c
crypto/ec/ec_key.c
crypto/ec/ecx_key.c
crypto/rsa/rsa_lib.c
include/crypto/dh.h
include/crypto/dsa.h
include/crypto/ec.h
include/crypto/ecx.h
include/crypto/rsa.h
providers/implementations/encode_decode/decode_der2key.c