Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kvH2Q-00015z-Qf for mharc-grub-devel@gnu.org; Fri, 01 Jan 2021 04:48:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvH2P-00015l-Fc for grub-devel@gnu.org; Fri, 01 Jan 2021 04:48:01 -0500 Received: from smtpq3.tb.mail.iss.as9143.net ([212.54.42.166]:49578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvH2N-0005Vc-Kt for grub-devel@gnu.org; Fri, 01 Jan 2021 04:48:01 -0500 Received: from [212.54.42.137] (helo=smtp6.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvH2I-0000cZ-V3 for grub-devel@gnu.org; Fri, 01 Jan 2021 10:47:54 +0100 Received: from 80-115-99-116.cable.dynamic.v4.ziggo.nl ([80.115.99.116] helo=mail.kngnt.org) by smtp6.tb.mail.iss.as9143.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kvH2H-00DjZC-Qx for grub-devel@gnu.org; Fri, 01 Jan 2021 10:47:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kngnt.org; s=mail; t=1609494472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=moY3UKpykw7c+vk43nC6o2O6xkUp2u5wEObYW5gqHh0=; b=QQWPo0qkr+dFeBjXCDUiMbWVLksklnqzcoUYwdYibfiyEr20m8BQj6F84xKHl8Zxfy4ulj 8tEDFIEOMrrpKv+WvkvPaSWi5Gqmk/heyP5qNZhprSuPNAqja5K3+4KPXJAqpm7t7f7+AF AgSa1nGQb5FXFoWYRpAv5frJqFtA4Pa/OklaHXanKdD5em5Xe3sK+EUXmjZXcnZYMKQfRt /GJkDIwEIKRQhzSPlSOmgxzswE+SAJKJUrSnyK0B7bb0/zCCYMCQ3FLgTmhtEfVNBu8JX7 IM9v8wER973TUVL9jfy2SBQ7Y8dcbHDW4SehfJ75WEZDnroB+mNbFoHy01mlQQ== From: Felix Rubio Dalmau To: grub-devel@gnu.org Subject: About grub signing config files Date: Fri, 01 Jan 2021 10:47:43 +0100 Message-ID: <1971077.2ofjnBIiLg@polaris> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SourceIP: 80.115.99.116 X-Authenticated-Sender: f.rubiodalmau@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.4 cv=TcEoCTch c=1 sm=1 tr=0 ts=5feeefc9 a=L5q10J0BAxueQzk5LW0IQA==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=kj9zAlcOel0A:10 a=EmqxpYm9HcoA:10 a=9L5pVl7xiWXirkNJiMQA:9 a=CjuIK1q_8ugA:10 X-Ziggo-Spam-Status: No Received-SPF: pass client-ip=212.54.42.166; envelope-from=felix@kngnt.org; helo=smtpq3.tb.mail.iss.as9143.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 09:48:01 -0000 Hi everybody (and happy 2021)! I have just installed debian stable, with Grub2. I want to make full use of secure boot and kernel/initramfs/grub config files signing, but I have have not been able to find an "already maintained" way to do it. I think I have come with a minimal set of changes that a) provide the grub config file signing, and b) break nothing (I think), and I want to share them with you so that maybe they can be included in upstream grub? The assumptions are that a) gpg is installed, and b) the default name format for the signature files (so, ending in .sig is used). In short, it boils down to a) defining a variable GRUB_SIGNING_KEY with the fingerprint of the key to be used. b) add this to grub-mkconfig ########### if [ "x${GRUB_SIGNING_KEY}" != "x" -a "x${grub_cfg}" != "x" ]; then gpg --yes --default-key ${GRUB_SIGNING_KEY} --detach-sign ${grub_cfg} >&2 echo >&2 fi ########### c) add another exception for *.sig in the function 'grub_file_is_not_garbage' in grub-mkconfig_lib What are your comments? Thank you, Felix