summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-01-25 15:24:46 +0100
committerRichard Levitte <levitte@openssl.org>2021-02-23 13:41:47 +0100
commite19246dc721a7a57c62d7dd39c70b6c87140b0ec (patch)
tree1c0dadbc9b5e9a905d7b56b079deed086c8a2a32 /include
parent6179dfc7c4bd850004c3b4b8220f3559573130d5 (diff)
EVP: Make evp_pkey_ctx_state() available to all of EVP
This will help with transitioning diverse functions to be able to use the ctrl<->OSSL_PARAM translators. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13913)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/evp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index cc74f11548..2a92a1e533 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -858,4 +858,10 @@ EVP_PKEY *evp_privatekey_from_binary(int keytype, EVP_PKEY **a,
const unsigned char **pp, long length,
OSSL_LIB_CTX *libctx, const char *propq);
+/* Three possible states: */
+# define EVP_PKEY_STATE_UNKNOWN 0
+# define EVP_PKEY_STATE_LEGACY 1
+# define EVP_PKEY_STATE_PROVIDER 2
+int evp_pkey_ctx_state(const EVP_PKEY_CTX *ctx);
+
#endif /* OSSL_CRYPTO_EVP_H */