EVP: add EVP_PKEY_is_a() and EVP_PKEY_can_sign()
authorRichard Levitte <levitte@openssl.org>
Mon, 16 Mar 2020 17:55:32 +0000 (18:55 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 8 Apr 2020 13:29:14 +0000 (15:29 +0200)
commit4f76d62f2384d3335bd1d043706995ae64b37348
tree256ae2921d171ab860f07de4f1429e8c3ea28468
parent82e1fc1bc06a87278b2dada07e40a4296e6898c7
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)
crypto/evp/p_lib.c
doc/man3/EVP_PKEY_is_a.pod [new file with mode: 0644]
doc/man3/EVP_PKEY_set1_RSA.pod
include/openssl/evp.h
util/libcrypto.num