2023-10-18 03:25:56 +02:00
|
|
|
From 1bb5f3aafc9b4bff638ed3288308289fdec60270 Mon Sep 17 00:00:00 2001
|
2023-07-24 12:29:19 +02:00
|
|
|
From: Michal Suchanek <msuchanek@suse.de>
|
|
|
|
Date: Mon, 17 Jul 2023 21:23:51 +0200
|
2023-10-18 03:25:56 +02:00
|
|
|
Subject: [PATCH 1/6] configure: Detect openssl sm3 support
|
2023-07-24 12:29:19 +02:00
|
|
|
|
|
|
|
Older openssl versions do not support sm3. The code has an option to
|
|
|
|
disable the sm3 hash but the lack of openssl support is not detected
|
|
|
|
automatically.
|
|
|
|
|
|
|
|
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
|
|
|
---
|
2023-10-18 03:25:56 +02:00
|
|
|
configure.ac | 7 +++++++
|
2023-09-30 02:22:25 +02:00
|
|
|
1 file changed, 7 insertions(+)
|
2023-07-24 12:29:19 +02:00
|
|
|
|
2023-10-18 03:25:56 +02:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
index 82a853289a83..e5bceeaa1722 100644
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
|
|
|
@@ -123,6 +123,13 @@ AC_ARG_WITH([openssl],
|
|
|
|
AS_IF([test "x$with_openssl" != "xno"], [
|
2023-09-30 02:22:25 +02:00
|
|
|
PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"])
|
2023-07-24 12:29:19 +02:00
|
|
|
AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.])
|
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <openssl/ssl.h>
|
|
|
|
+ int nid = NID_sm3;]])], [
|
|
|
|
+ AC_MSG_NOTICE([openssl supports sm3])
|
|
|
|
+ ], [
|
|
|
|
+ AC_MSG_NOTICE([openssl sm3 support not detected])
|
|
|
|
+ CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SM3"
|
|
|
|
+ ])
|
|
|
|
], [
|
|
|
|
AC_MSG_NOTICE([openssl support not requested])
|
|
|
|
])
|
2023-10-18 03:25:56 +02:00
|
|
|
--
|
|
|
|
2.42.0
|
|
|
|
|