Improve the performance of EVP_PKCS82PKEY_ex
authorMatt Caswell <matt@openssl.org>
Wed, 1 Mar 2023 11:14:25 +0000 (11:14 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 6 Mar 2023 10:53:31 +0000 (10:53 +0000)
commit52ce351a674bf459c836ffd01afb09917889f047
tree6a758d6a07a0ee77dafa425b309c5a50df09719e
parent10836921e52ff9110c12b4b9f984e7c5ef1c89cc
Improve the performance of EVP_PKCS82PKEY_ex

We can easily find out the keytype which should significantly improve
the performance of this function because we don't have to try every loaded
decoder.

Partial fix for #20399

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20412)
crypto/evp/evp_pkey.c