EVP: Make evp_pkey_ctx_state() available to all of EVP
[openssl.git] / include / crypto / evp.h
index 7f28edd6c2567a1b0c40bde1cb4f4b3a3ccf0282..2a92a1e5331043a762c1682923dcf96e9145a6b5 100644 (file)
@@ -23,7 +23,7 @@
 #define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX   0x0400
 
 /*
- * An EVP_PKEY can have the following support states:
+ * An EVP_PKEY_CTX can have the following support states:
  *
  * Supports legacy implementations only:
  *
@@ -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 */