From 929f651eaa763625eab602516706a1bf4ba3bc32 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 19 Jul 2021 16:17:50 +0100 Subject: Fix custom EVP_PKEY_METHOD implementations where no engine is present It is possible to have a custom EVP_PKEY_METHOD implementation without having an engine. In those cases we were failing to use that custom implementation. Fixes #16088 Reviewed-by: Paul Dale Reviewed-by: Nicola Tuveri Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/16118) --- include/crypto/evp.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'include') diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 3707977d9d..68aab33cae 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -22,19 +22,8 @@ */ #define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400 -/* - * An EVP_PKEY_CTX can have the following support states: - * - * Supports legacy implementations only: - * - * engine != NULL || keytype == NULL - * - * Supports provided implementations: - * - * engine == NULL && keytype != NULL - */ #define evp_pkey_ctx_is_legacy(ctx) \ - ((ctx)->engine != NULL || (ctx)->keytype == NULL) + ((ctx)->keymgmt == NULL) #define evp_pkey_ctx_is_provided(ctx) \ (!evp_pkey_ctx_is_legacy(ctx)) -- cgit v1.2.3