summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-09 13:02:58 +0200
committerRichard Levitte <levitte@openssl.org>2020-10-30 13:09:52 +0100
commit140eee2b3b3090107aea2d09ab10eb737fb1e5bb (patch)
treed9da74dea16ae5ce298509fe5eb96fb1ee386b7f /include
parentf79289389edef63b76c6c2a3042435dda7d42dfd (diff)
Add easy to digest selector macros for EVP_PKEYs
These are meant to be used with functions like OSSL_ENCODER_CTX_new_by_EVP_PKEY() The OSSL_ENCODER_CTX_new_by_EVP_PKEY() manual is also expanded on the topics of output types and selections. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13189)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/evp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 4472bcf50e..ba13960d6a 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -75,6 +75,14 @@
/* Special indicator that the object is uniquely provider side */
# define EVP_PKEY_KEYMGMT -1
+/* Easy to use macros for EVP_PKEY related selections */
+# define EVP_PKEY_KEY_PARAMETERS \
+ ( OSSL_KEYMGMT_SELECT_ALL_PARAMETERS )
+# define EVP_PKEY_PUBLIC_KEY \
+ ( EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY )
+# define EVP_PKEY_KEYPAIR \
+ ( EVP_PKEY_PUBLIC_KEY | OSSL_KEYMGMT_SELECT_PRIVATE_KEY )
+
#ifdef __cplusplus
extern "C" {
#endif