Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp539400iol; Sat, 11 Jun 2022 10:40:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCX/Vg+Q8RKoWA7PtxMFEX9yi+uL9x5NSCt9x0TUmojdGn79GNoZnVvA31rDrf8mo5yXCt X-Received: by 2002:a17:906:77c8:b0:711:f562:429d with SMTP id m8-20020a17090677c800b00711f562429dmr17128921ejn.96.1654969214454; Sat, 11 Jun 2022 10:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654969214; cv=none; d=google.com; s=arc-20160816; b=Rj8KqurQwf74l1qyfVnbh//TdyOSijduVnZOc2HlT7CAkBUoUNNl06gNkekO9JYymO eAz3RKEvzQdwP/nFdpC2Ll6yG8REfx8uBbQ1N8fMHF+eHEWgFXUtB1JIRVyz6NL3Suys Ubg3KoXw3FErhifHk9l26uWROzGrga9fTut37MwZ3n69E7MYGYAKEfDZtDAAfdDPXbBD eq0pPvAUwoMNzn5F2cIs30OuFyYOVVlaM3IPKI3hcCNsGZihVkY69j3aJsRUwnYP/dcp kVetkGjOEr2PrIsjTygM5geXNrRDtqsi2Iank+9IWwEl39Yt8KUNPvrhFCHDgzbzna6L w6qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=A23KTIgin1aGL7tlLpcBM/pr60oqIzwLBoV8Wxeh2p0=; b=CTjy3WIVDkoZZ9jTMk0R9V8L96gvxGicHkKSxKFB5X/4oH5hfdxQ1HJM1F+Go1Bm6U Q++DUQNRudZecgrlasRmxa2AT3HgxR3Ir1eYT246rc/m9RYF0yj3oGOWPiTS0qWLSKng LpreWaZYLuPVOeQwYyXLNHmYFBLbOwqP1icWiNW5mfkteq6iTEhdczhDwxjvEE7ffd9y mKjkMAUa7L8eHYlWE6QOmkrfNFK59idr5+WBsIY641aK247wBn0lUTPCb9Z0l7XnyS8U 3aq9eMmOur6aJmg2mmIJiZJUL6rIx00x5QVW4AVIMLHn9nTqyXgDiKCtjtiwZ6VAQMyr cllw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Llyi0YLJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a17090672ca00b006feb18c72bfsi2571873ejl.126.2022.06.11.10.39.48; Sat, 11 Jun 2022 10:40:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Llyi0YLJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239012AbiFKRX5 (ORCPT + 99 others); Sat, 11 Jun 2022 13:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238179AbiFKRXn (ORCPT ); Sat, 11 Jun 2022 13:23:43 -0400 Received: from conuserg-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C30783CA54; Sat, 11 Jun 2022 10:23:37 -0700 (PDT) Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-09.nifty.com with ESMTP id 25BHMhjQ022692; Sun, 12 Jun 2022 02:22:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 25BHMhjQ022692 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1654968166; bh=A23KTIgin1aGL7tlLpcBM/pr60oqIzwLBoV8Wxeh2p0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Llyi0YLJ14b5QWQVQPqHLa7n2JvTbXAheXVqnQLLwV0dA7csg05zwWc8mLxmZ0bTj rAV3r35WL7MPi6o487lTvAsb//1F7Y4OHCgePgTH/1I+q/IVsQZhWBgSB2yvhdP10e YZmOYrv0zRp/1mQaUqky6+MZM3SdSr3Z778OEhDjM84ORNU5/nqSdtOdXt7dB7NP9f sIlf0jfmyFU8xV0RBK52K66MsXzXjxfBObAHb7cgkwgAHL7vpN8KPUzR64FTmW0lou DGiWioOnHdDVKsgy2fW8e6xGEgYUaUjVATsKAe7hwOOUHouugTZhBJH3DjyTuDrbR7 FIfgpRrAQ1IeQ== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: David Howells , Jarkko Sakkinen , =?UTF-8?q?Micka=8F=AB=B3l=20Sala=8F=AB=E4n?= , Masahiro Yamada , David Woodhouse , keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] certs: unify blacklist_hashes.c and blacklist_nohashes.c Date: Sun, 12 Jun 2022 02:22:33 +0900 Message-Id: <20220611172233.1494073-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220611172233.1494073-1-masahiroy@kernel.org> References: <20220611172233.1494073-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These two files are very similar. Unify them. Signed-off-by: Masahiro Yamada --- certs/Makefile | 12 +++++------- certs/blacklist_hashes.c | 1 - certs/blacklist_nohashes.c | 6 ------ 3 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 certs/blacklist_nohashes.c diff --git a/certs/Makefile b/certs/Makefile index df7aaeafd19c..7068d45db807 100644 --- a/certs/Makefile +++ b/certs/Makefile @@ -4,24 +4,22 @@ # obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o common.o -obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o +obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o blacklist_hashes.o obj-$(CONFIG_SYSTEM_REVOCATION_LIST) += revocation_certificates.o -ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),) $(obj)/blacklist_hashes.o: $(obj)/blacklist_hash_list CFLAGS_blacklist_hashes.o := -I $(obj) quiet_cmd_check_and_copy_blacklist_hash_list = GEN $@ cmd_check_and_copy_blacklist_hash_list = \ + $(if $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST), \ $(AWK) -f $(srctree)/$(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \ - cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) > $@ + { cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST); echo $(comma) NULL; } > $@, \ + echo NULL > $@) $(obj)/blacklist_hash_list: $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) FORCE $(call if_changed,check_and_copy_blacklist_hash_list) -obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o -else -obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o -endif + targets += blacklist_hash_list quiet_cmd_extract_certs = CERT $@ diff --git a/certs/blacklist_hashes.c b/certs/blacklist_hashes.c index 86d66fe11348..0c5476abebd9 100644 --- a/certs/blacklist_hashes.c +++ b/certs/blacklist_hashes.c @@ -3,5 +3,4 @@ const char __initconst *const blacklist_hashes[] = { #include "blacklist_hash_list" - , NULL }; diff --git a/certs/blacklist_nohashes.c b/certs/blacklist_nohashes.c deleted file mode 100644 index 753b703ef0ef..000000000000 --- a/certs/blacklist_nohashes.c +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include "blacklist.h" - -const char __initconst *const blacklist_hashes[] = { - NULL -}; -- 2.32.0