diff options
author | Matt Caswell <matt@openssl.org> | 2021-02-24 16:38:28 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-03-08 15:11:31 +0000 |
commit | b574c6a9ac96825b4f19c5e835273bf176174af8 (patch) | |
tree | 0320f1f6cd4905072ce38567868d3fe4881c8859 /crypto/evp/pmeth_lib.c | |
parent | ec961f866ac048a2d3dfd6adcfa95042114bef52 (diff) |
Cache legacy keys instead of downgrading them
If someone calls an EVP_PKEY_get0*() function then we create a legacy
key and cache it in the EVP_PKEY - but it doesn't become an "origin" and
it doesn't ever get updated. This will be documented as a restriction of
the EVP_PKEY_get0*() function with provided keys.
Fixes #14020
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14319)
Diffstat (limited to 'crypto/evp/pmeth_lib.c')
-rw-r--r-- | crypto/evp/pmeth_lib.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index b08d0d2e3c..96d103544d 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -266,8 +266,7 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, /* * Chase down the legacy NID, as that might be needed for diverse * purposes, such as ensure that EVP_PKEY_type() can return sensible - * values, or that there's a better chance to "downgrade" a key when - * needed. We go through all keymgmt names, because the keytype + * values. We go through all keymgmt names, because the keytype * that's passed to this function doesn't necessarily translate * directly. * TODO: Remove this when #legacy keys are gone. |