From: Richard Levitte Date: Mon, 8 Feb 2021 16:25:41 +0000 (+0100) Subject: EVP: make evp_pkey_is_assigned() usable in the FIPS module X-Git-Tag: openssl-3.0.0-alpha13~231 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d4928edd0758753e43294816ae6095975a6e5fa;p=thirdparty%2Fopenssl.git EVP: make evp_pkey_is_assigned() usable in the FIPS module Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/13913) --- diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 2a92a1e5331..b0e82f6c818 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -598,8 +598,13 @@ DEFINE_STACK_OF(OP_CACHE_ELEM) ((pk)->type == EVP_PKEY_NONE && (pk)->keymgmt == NULL) #define evp_pkey_is_typed(pk) \ ((pk)->type != EVP_PKEY_NONE || (pk)->keymgmt != NULL) -#define evp_pkey_is_assigned(pk) \ +#ifndef FIPS_MODULE +# define evp_pkey_is_assigned(pk) \ ((pk)->pkey.ptr != NULL || (pk)->keydata != NULL) +#else +# define evp_pkey_is_assigned(pk) \ + ((pk)->keydata != NULL) +#endif #define evp_pkey_is_legacy(pk) \ ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL) #define evp_pkey_is_provided(pk) \