Skip to content
Commit 2c2726cd authored by Simo Sorce's avatar Simo Sorce Committed by Tomas Mraz
Browse files

Propagate selection all the way on key export



EVP_PKEY_eq() is used to check, among other things, if a certificate
public key corresponds to a private key. When the private key belongs to
a provider that does not allow to export private keys this currently
fails as the internal functions used to import/export keys ignored the
selection given (which specifies that only the public key needs to be
considered) and instead tries to export everything.

This patch allows to propagate the selection all the way down including
adding it in the cache so that a following operation actually looking
for other selection parameters does not mistakenly pick up an export
containing only partial information.

Signed-off-by: default avatarSimo Sorce <simo@redhat.com>

Reviewed-by: default avatarDmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: default avatarTomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19648)

(cherry picked from commit 98642df4)
parent 2f3f0b0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment