From patchwork Tue Jul 18 12:01:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michal_Such=C3=A1nek?= X-Patchwork-Id: 13317060 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9141BC001DC for ; Tue, 18 Jul 2023 12:03:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232191AbjGRMDb (ORCPT ); Tue, 18 Jul 2023 08:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbjGRMD3 (ORCPT ); Tue, 18 Jul 2023 08:03:29 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93896E47; Tue, 18 Jul 2023 05:03:27 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 44A0B218EE; Tue, 18 Jul 2023 12:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689681806; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VG3nbQZ6NQlPAmYzpmo6KoCjwuY3FXsibXeDJl7sMQM=; b=lTrh5HE3QZv5mu8b5Ytjm53UsTjwxmdJXanRewoKmSbJN24dQqbuMqfhMYWeHgvbViNcDB M+//oXkd7rJY+dVTdqdEubM3GCCZtelXUNQ5W7cq6ZOj+qzcjqLYSHEfdyGboOvgEQ7K8b yemZJtS5cx+14bgzWi4Ud8xb2u8pnJE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689681806; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VG3nbQZ6NQlPAmYzpmo6KoCjwuY3FXsibXeDJl7sMQM=; b=svYsuHjD3AqEe3A9+vR3sCejz0Mq2M3b8oE9C3L0wq4+p2+G3cW+GVjFdGDgvTx7ZVJd8I m0EVY4KErmmORzDw== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) by relay2.suse.de (Postfix) with ESMTP id EECE32C143; Tue, 18 Jul 2023 12:03:25 +0000 (UTC) From: Michal Suchanek To: linux-modules@vger.kernel.org Cc: Michal Suchanek , Takashi Iwai , Lucas De Marchi , =?utf-8?q?Michal_Koutn=C3=BD?= , Jiri Slaby , Jan Engelhardt , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH kmod v5 1/5] configure: Detect openssl sm3 support Date: Tue, 18 Jul 2023 14:01:52 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 --- 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 + 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]) ])