Blame SOURCES/0004-Add-compile-check-for-EVP_PKEY_get_id-along-with-EVP.patch

41734f
From f6672effea3cf9e50d6d3f29c1fbfbf6b1578e06 Mon Sep 17 00:00:00 2001
41734f
From: Rob Crittenden <rcritten@redhat.com>
41734f
Date: Tue, 28 Sep 2021 10:01:35 -0400
41734f
Subject: [PATCH] Add compile check for EVP_PKEY_get_id along with EVP_PKEY_id
41734f
41734f
EVP_PKEY_id is no longer available as a function, only as a preprocessor
41734f
macro, so AC_CHECK_FUNCS cannot recognize it.
41734f
41734f
This was changed in OpenSSL 3.0.0-beta2
41734f
41734f
https://bugzilla.redhat.com/show_bug.cgi?id=2008451
41734f
41734f
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
41734f
---
41734f
 configure.ac | 1 +
41734f
 src/util-o.c | 2 +-
41734f
 2 files changed, 2 insertions(+), 1 deletion(-)
41734f
41734f
diff --git a/configure.ac b/configure.ac
41734f
index 8bfa3fa..3b413a1 100644
41734f
--- a/configure.ac
41734f
+++ b/configure.ac
41734f
@@ -374,6 +374,7 @@ if ! ${configure_dist_target_only:-false} ; then
41734f
 		AC_CHECK_FUNCS(ASN1_TIME_set)
41734f
 		AC_CHECK_FUNCS(EVP_PKEY_base_id)
41734f
 		AC_CHECK_FUNCS(EVP_PKEY_id)
41734f
+		AC_CHECK_FUNCS(EVP_PKEY_get_id)
41734f
 		AC_CHECK_FUNCS(OBJ_get0_data)
41734f
 		AC_CHECK_FUNCS(OBJ_length)
41734f
 		AC_CHECK_FUNCS(X509_ATTRIBUTE_get0_object)
41734f
diff --git a/src/util-o.c b/src/util-o.c
41734f
index 2208ab6..db45964 100644
41734f
--- a/src/util-o.c
41734f
+++ b/src/util-o.c
41734f
@@ -329,7 +329,7 @@ util_ASN1_TIME_set(ASN1_TIME *str, time_t t)
41734f
 int
41734f
 util_EVP_PKEY_id(const EVP_PKEY *pkey)
41734f
 {
41734f
-#ifdef HAVE_EVP_PKEY_ID
41734f
+#if defined(HAVE_EVP_PKEY_ID) || defined(HAVE_EVP_PKEY_GET_ID)
41734f
 	return EVP_PKEY_id(pkey);
41734f
 #else
41734f
 	return pkey->type;
41734f
-- 
41734f
2.31.1
41734f