buildroot/package/opensc/0006-fixed-detection-of-SHA...

28 lines
1.1 KiB
Diff

From 33351d91aa22fa8077847ba3f19abb5a00b04600 Mon Sep 17 00:00:00 2001
From: Frank Morgner <frankmorgner@gmail.com>
Date: Tue, 15 Aug 2023 17:58:21 +0200
Subject: [PATCH] fixed detection of SHA3 compatibility
fixes https://github.com/OpenSC/OpenSC/issues/2836
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: https://github.com/OpenSC/OpenSC/commit/33351d91aa22fa8077847ba3f19abb5a00b04600
---
src/libopensc/sc-ossl-compat.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h
index 8012cd4c0f..96ec4bd736 100644
--- a/src/libopensc/sc-ossl-compat.h
+++ b/src/libopensc/sc-ossl-compat.h
@@ -50,7 +50,8 @@ extern "C" {
#if LIBRESSL_VERSION_NUMBER < 0x30500000L
#define FIPS_mode() (0)
#endif
-#ifndef EVP_sha3_224
+/* OpenSSL 1.1.1 has EVP_sha3_* */
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30800000L
#define EVP_sha3_224() (NULL)
#define EVP_sha3_256() (NULL)
#define EVP_sha3_384() (NULL)