summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-02-08 17:25:41 +0100
committerRichard Levitte <levitte@openssl.org>2021-02-23 13:41:47 +0100
commit4d4928edd0758753e43294816ae6095975a6e5fa (patch)
treed446888fe274ace52387c2ff8e67c96ddfd7815a /include/crypto
parente19246dc721a7a57c62d7dd39c70b6c87140b0ec (diff)
EVP: make evp_pkey_is_assigned() usable in the FIPS module
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/crypto')
-rw-r--r--include/crypto/evp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index 2a92a1e533..b0e82f6c81 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) \