DECODER & ENCODER: Make sure to pass around the original selection bits
authorRichard Levitte <levitte@openssl.org>
Mon, 28 Jun 2021 03:52:42 +0000 (05:52 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 29 Jun 2021 11:50:51 +0000 (13:50 +0200)
commit398f8fe1c48e19e29f099a55bb49d601911f463d
tree631e04d80070361e56e15415150892492257b225
parent6eaf139f62001b958861f25c5cebc41c76c579bd
DECODER & ENCODER: Make sure to pass around the original selection bits

When decoding a key and asking the keymgmt to import the key data, it
was told that the key data includes everything.  This may not be true,
since the user may have specified a different selection, and some
keymgmts may want to be informed.

Our key decoders' export function, on the other hand, didn't care
either, and simply export anything they could, regardless.

In both cases, the selection that was specified by the user is now
passed all the way.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15934)
crypto/encode_decode/decoder_pkey.c
providers/implementations/encode_decode/decode_der2key.c
providers/implementations/encode_decode/decode_msblob2key.c
providers/implementations/encode_decode/decode_pvk2key.c