From 4f76d62f2384d3335bd1d043706995ae64b37348 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 16 Mar 2020 18:55:32 +0100 Subject: EVP: add EVP_PKEY_is_a() and EVP_PKEY_can_sign() EVP_PKEY_is_a() is the provider side key checking function corresponding to checking EVP_PKEY_id() or an EVP_PKEY against macros like EVP_PKEY_EC. It also works with legacy internal keys. We also add a warning indoc/man3/EVP_PKEY_set1_RSA.pod regarding the reliability of certain functions that only understand legacy keys. Finally, we take the opportunity to clean up doc/man3/EVP_PKEY_set1_RSA.pod to better conform with man-page layout norms, see man-pages(7) on Linux. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/11358) --- include/openssl/evp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 4903fc5f42..4545bf7170 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1104,6 +1104,7 @@ DEPRECATEDIN_3_0(int EVP_PKEY_decrypt_old(unsigned char *dec_key, DEPRECATEDIN_3_0(int EVP_PKEY_encrypt_old(unsigned char *enc_key, const unsigned char *key, int key_len, EVP_PKEY *pub_key)) +int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name); int EVP_PKEY_type(int type); int EVP_PKEY_id(const EVP_PKEY *pkey); int EVP_PKEY_base_id(const EVP_PKEY *pkey); -- cgit v1.2.3