lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b97e20faa07e9e31c6eaf96683011aa24e80760c.1689681454.git.msuchanek@suse.de>
Date:   Tue, 18 Jul 2023 14:01:52 +0200
From:   Michal Suchanek <msuchanek@...e.de>
To:     linux-modules@...r.kernel.org
Cc:     Michal Suchanek <msuchanek@...e.de>, Takashi Iwai <tiwai@...e.com>,
        Lucas De Marchi <lucas.de.marchi@...il.com>,
        Michal Koutný <mkoutny@...e.com>,
        Jiri Slaby <jslaby@...e.com>, Jan Engelhardt <jengelh@...i.de>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH kmod v5 1/5] configure: Detect openssl sm3 support

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@...e.de>
---
 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 6064dee77ae6..331cc8a1ffd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,6 +123,13 @@ AC_ARG_WITH([openssl],
 AS_IF([test "x$with_openssl" != "xno"], [
 	PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"])
 	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])
 ])
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ