DESERIALIZER: Fix EVP_PKEY construction by export

When the keymgmt provider and the deserializer provider differ,
deserialization uses the deserializer export function instead of the
keymgmt load, with a selection of what parts should be exported.  That
selection was set to OSSL_KEYMGMT_SELECT_ALL_PARAMETERS when it should
have been OSSL_KEYMGMT_SELECT_ALL.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12571)
This commit is contained in:
Richard Levitte 2020-08-03 07:22:37 +02:00
parent aff8c0a411
commit 4c525cb5b6
1 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ static int deser_construct_EVP_PKEY(OSSL_DESERIALIZER_INSTANCE *deser_inst,
OSSL_DESERIALIZER_provider(deser);
/*
* If the EVP_KEYMGMT and the OSSL_DDESERIALIZER are from the
* If the EVP_KEYMGMT and the OSSL_DESERIALIZER are from the
* same provider, we assume that the KEYMGMT has a key loading
* function that can handle the provider reference we hold.
*
@ -195,7 +195,7 @@ static int deser_construct_EVP_PKEY(OSSL_DESERIALIZER_INSTANCE *deser_inst,
import_data.keymgmt = keymgmt;
import_data.keydata = NULL;
import_data.selection = OSSL_KEYMGMT_SELECT_ALL_PARAMETERS;
import_data.selection = OSSL_KEYMGMT_SELECT_ALL;
/*
* No need to check for errors here, the value of