diff options
author | Richard Levitte <levitte@openssl.org> | 2020-03-16 18:55:32 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-04-08 15:29:14 +0200 |
commit | 4f76d62f2384d3335bd1d043706995ae64b37348 (patch) | |
tree | 256ae2921d171ab860f07de4f1429e8c3ea28468 /include | |
parent | 82e1fc1bc06a87278b2dada07e40a4296e6898c7 (diff) |
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 <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11358)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/evp.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |