From 896dcda18bf9347deb507f1d3c1f7e17638dd745 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Mon, 8 Mar 2021 21:36:10 +0100 Subject: Non-const accessor to legacy keys Fixes #14466. Reverting the changes of the EVP_PKEY_get0 function. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14468) --- doc/man3/EVP_PKEY_set1_RSA.pod | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/man3/EVP_PKEY_set1_RSA.pod b/doc/man3/EVP_PKEY_set1_RSA.pod index 64760b2923..68e13d3480 100644 --- a/doc/man3/EVP_PKEY_set1_RSA.pod +++ b/doc/man3/EVP_PKEY_set1_RSA.pod @@ -8,8 +8,9 @@ EVP_PKEY_get0_RSA, EVP_PKEY_get0_DSA, EVP_PKEY_get0_DH, EVP_PKEY_get0_EC_KEY, EVP_PKEY_assign_RSA, EVP_PKEY_assign_DSA, EVP_PKEY_assign_DH, EVP_PKEY_assign_EC_KEY, EVP_PKEY_assign_POLY1305, EVP_PKEY_assign_SIPHASH, EVP_PKEY_get0_hmac, EVP_PKEY_get0_poly1305, EVP_PKEY_get0_siphash, -EVP_PKEY_type, EVP_PKEY_id, EVP_PKEY_base_id, EVP_PKEY_set_alias_type, -EVP_PKEY_set1_engine, EVP_PKEY_get0_engine - EVP_PKEY assignment functions +EVP_PKEY_get0, EVP_PKEY_type, EVP_PKEY_id, EVP_PKEY_base_id, +EVP_PKEY_set_alias_type, EVP_PKEY_set1_engine, EVP_PKEY_get0_engine - +EVP_PKEY assignment functions =head1 SYNOPSIS @@ -42,6 +43,7 @@ L: const DSA *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey); const DH *EVP_PKEY_get0_DH(const EVP_PKEY *pkey); const EC_KEY *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey); + void *EVP_PKEY_get0(const EVP_PKEY *pkey); int EVP_PKEY_assign_RSA(EVP_PKEY *pkey, RSA *key); int EVP_PKEY_assign_DSA(EVP_PKEY *pkey, DSA *key); @@ -100,7 +102,8 @@ are deprecated. Applications should instead use the EVP_PKEY directly where possible. If access to the low level key parameters is required then applications should use L and other similar functions. To write an EVP_PKEY out use the OSSL_ENCODER APIs (see -L). +L). EVP_PKEY_get0() returns a pointer to the +legacy key or NULL if the key is not legacy. Note that if an EVP_PKEY was not constructed using one of the deprecated functions such as EVP_PKEY_set1_RSA(), EVP_PKEY_set1_DSA(), EVP_PKEY_set1_DH() -- cgit v1.2.3