Fix serializer_EVP_PKEY_to_bio so that that the key is exported if the serializer...
authorShane Lontis <shane.lontis@oracle.com>
Mon, 10 Aug 2020 00:16:26 +0000 (10:16 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Tue, 11 Aug 2020 23:25:49 +0000 (09:25 +1000)
commitaf88e64a98a6402dabd41ac2de194444dd285b49
tree01e778e2735cd0465bcf3f24d029dc90369ee831
parent7c9a7cf12715ac3e906b8d55466f19285fc59e78
Fix serializer_EVP_PKEY_to_bio so that that the key is exported if the serializer provider does not match the key provider.

RSA keys in the 'base' provider are different from a fips provider RSA key (since they have different object structures).
To use a fips provider key in the base serializer the key needs to be exported.
The fix was suggested by @levitte.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12162)
crypto/serializer/serializer_pkey.c