diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-03-23 16:40:53 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-03-25 15:24:00 +0100 |
commit | 4f0831b837e97504d4cfbfecfca069c527be4a2b (patch) | |
tree | 90411cdb7d183a26a30e84f5f5b94add560f7e39 /include | |
parent | 468d9d556409a53da2c5d16961f9531dd10a6e1b (diff) |
EVP_PKCS82PKEY: Create provided keys if possible
Use OSSL_DECODER to decode the PKCS8 data to create provided keys.
If that fails fallback to the legacy implementation.
Fixes #14302
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14659)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/evp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 18c50cdd33..2089b8b913 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -727,6 +727,8 @@ void *evp_pkey_export_to_provider(EVP_PKEY *pk, OSSL_LIB_CTX *libctx, int evp_pkey_copy_downgraded(EVP_PKEY **dest, const EVP_PKEY *src); void *evp_pkey_get_legacy(EVP_PKEY *pk); void evp_pkey_free_legacy(EVP_PKEY *x); +EVP_PKEY *evp_pkcs82pkey_legacy(const PKCS8_PRIV_KEY_INFO *p8inf, + OSSL_LIB_CTX *libctx, const char *propq); #endif /* |