return pmeth;
}
-/* Three possible states: */
-# define EVP_PKEY_STATE_UNKNOWN 0
-# define EVP_PKEY_STATE_LEGACY 1
-# define EVP_PKEY_STATE_PROVIDER 2
+static void help_get_legacy_alg_type_from_keymgmt(const char *keytype,
+ void *arg)
+{
+ int *type = arg;
+
+ if (*type == NID_undef)
+ *type = evp_pkey_name2type(keytype);
+}
-static int evp_pkey_ctx_state(EVP_PKEY_CTX *ctx)
+static int get_legacy_alg_type_from_keymgmt(const EVP_KEYMGMT *keymgmt)
+{
+ int type = NID_undef;
+
+ EVP_KEYMGMT_names_do_all(keymgmt, help_get_legacy_alg_type_from_keymgmt,
+ &type);
+ return type;
+}
+#endif /* FIPS_MODULE */
+
+int evp_pkey_ctx_state(const EVP_PKEY_CTX *ctx)
{
if (ctx->operation == EVP_PKEY_OP_UNDEFINED)
return EVP_PKEY_STATE_UNKNOWN;
return EVP_PKEY_STATE_LEGACY;
}
-static void help_get_legacy_alg_type_from_keymgmt(const char *keytype,
- void *arg)
-{
- int *type = arg;
-
- if (*type == NID_undef)
- *type = evp_pkey_name2type(keytype);
-}
-
-static int get_legacy_alg_type_from_keymgmt(const EVP_KEYMGMT *keymgmt)
-{
- int type = NID_undef;
-
- EVP_KEYMGMT_names_do_all(keymgmt, help_get_legacy_alg_type_from_keymgmt,
- &type);
- return type;
-}
-#endif /* FIPS_MODULE */
-
static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx,
EVP_PKEY *pkey, ENGINE *e,
const char *keytype, const char *propquery,
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 */