From patchwork Wed Nov 9 03:37:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 622917 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp19174pvb; Tue, 8 Nov 2022 19:35:57 -0800 (PST) X-Google-Smtp-Source: AMsMyM4q4jddL+e77c4oi43XBCV3DE2TXut+/hE6Cv8w9BSLiJLdnbQtOl2K+v//9bISFUCgfvh2 X-Received: by 2002:a17:906:4c4b:b0:7ad:a197:b58e with SMTP id d11-20020a1709064c4b00b007ada197b58emr56574825ejw.203.1667964957583; Tue, 08 Nov 2022 19:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667964957; cv=none; d=google.com; s=arc-20160816; b=gdkV8pVTG6/4qDFiBiVrlhiC+zGtP4jYKmYGba42JnxTpPWBEHuZHQ/0kku4w9iiSv NSi7zE+kQzaJWxA7p/9OuEd4R57VVdXzMTmHr7nZeVyT7AC/tAiGcOscKr9NbL7cu0li 6n1mdTY+1Qb2bYqFg3YT9GKYflPhMo7/4lQHxU7sRi/W7pd+xycsbDhHw6iDuyRYQBB7 WsL+8uFrQ2RkkP7JPA8Wj6ZvtdOBhZJy0mejbM6eHipRMM5o99XBpf6iVcg2POk7YzYB hk061XO9k8UD+hsY/Daxzxfmnxqh+loNiqAXWYCxanvXc7LKtd/ax/0DKPv70c12nWQE z6lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Wr5hjmRRxdLzpOguaCkA/6DOMtSfJbCCANiOYYhCr5E=; b=rL8MTwE5VALuuB3Ih1H9fNmUUmHoJY/UHvT8NRRhDlc9btYh64/nKPUMC+XPwm53Z0 i5nQRnQFiOzqLjFFxhBfIEZfEUjEz8quxVYyLoOT9+aR3ZPeA6yedk55poKZFsiiZPFC 3cjxkyN++E4oDQEomoouko6bRwvQ+LfMlwFL00g1gR0t+7Kai4UcWADIWmINCAB0azCb bIMxkF723l58WDtIs9V4e7tMcqDTqzbvgIc3zoCLZRL2QyaQ6fPes9x48ge90NXNrlhb ywWyRVrFi9TL19a41ybZnzPRqmQGq7ixl0uHQcg6hAoyxe08jaoqa8ivjGLBEJnsngNC fC3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zYpJPJ1a; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id dr12-20020a170907720c00b0078315844537si15249613ejc.378.2022.11.08.19.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 19:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zYpJPJ1a; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA17A84FE8; Wed, 9 Nov 2022 04:35:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="zYpJPJ1a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB58584FE8; Wed, 9 Nov 2022 04:35:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7A50C80431 for ; Wed, 9 Nov 2022 04:35:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pl1-x631.google.com with SMTP id p21so15925265plr.7 for ; Tue, 08 Nov 2022 19:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wr5hjmRRxdLzpOguaCkA/6DOMtSfJbCCANiOYYhCr5E=; b=zYpJPJ1a4S2nAbvLmKTmUYGnBIQNoieoCVoGJ5EAk4nSQe+WVF7Si3RIqOC3gE64NW FRCmgC0KT5QPMP4xnl6majxkZpO0pbyoxIKjYeVglIQc0iEk+tHgICpewP8/YzZ1jgq+ fcqUOFOAbaEL5otZVrxyjw5n9guPgrRmlXrglB0gFMN4nqJ/1cs082zUxYwg4YiMt+zX VGwHVaQQ1OwWF06p7/KsuYO7Wc6jp97X+bTwfv/cYeezfFIGL0FuAoBm06ORhH78FkCB dHajGDqrhFCLG+v4iSRLOLlHJuqjxOHVOmACfek8ceLKBVPsRwBIJJbt7mwanGByTRrH 02uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wr5hjmRRxdLzpOguaCkA/6DOMtSfJbCCANiOYYhCr5E=; b=GvVOAdbuyfWXm+Gdf1i/BkC0P2QKLHUit+AYlYTtKEUIWgal6lN8b4k49VGkelxnGE Wps1FfKtxO+RjEO5knEFRB0QPnAxKGvPsrYFh52CcL1uqEUpKq14SodHdv1QZ/NGuAe2 Fd6zxw6c9vSKDoxM8/oQPv3mwddLNgr1n8UilRYqiuwTzLGY6jXAKRD9CwVLf3dElNAz OqSpzZPy0eLaPXKpdqaqPocpMCpeRs2kMgZ3jr/k06f9ZfbF/nKIVzJYXvk8tLxVcwlX mavZ21oF0zO7WIWgeHmXc1/VqGmwxYsyhng/L76ch87vtawlZiXjYyopQB/GJF35dgwh Zfpg== X-Gm-Message-State: ACrzQf2BGycq0F2xJHE8uB8Jfkd8ORvUZtpIFoJuZ0EHmHFocMidJW0g EfZE8VgsCazmwdgUag1VYro/zA== X-Received: by 2002:a17:90a:2847:b0:213:9ae5:b9b4 with SMTP id p7-20020a17090a284700b002139ae5b9b4mr64753138pjf.136.1667964947730; Tue, 08 Nov 2022 19:35:47 -0800 (PST) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id e17-20020a17090301d100b00177f25f8ab3sm7838370plh.89.2022.11.08.19.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 19:35:46 -0800 (PST) From: Masahisa Kojima To: kojima.masahisa@socionext.com, u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Etienne Carriere , Masahisa Kojima Subject: [PATCH v7 0/5] eficonfig: add UEFI Secure Boot key maintenance interface Date: Wed, 9 Nov 2022 12:37:23 +0900 Message-Id: <20221109033728.5623-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This series adds the UEFI Secure Boot key maintenance interface to the eficonfig command. User can enroll PK, KEK, db and dbx. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b kojima/eficonfig_sbkey_v7 [Major Changes] - only accept .auth file - remove delete signature list feature Masahisa Kojima (5): eficonfig: refactor file selection handling eficonfig: expose append entry function eficonfig: refactor change boot order implementation eficonfig: add UEFI Secure Boot Key enrollment interface eficonfig: add "Show Signature Database" menu entry cmd/Makefile | 5 + cmd/eficonfig.c | 201 ++++---- cmd/eficonfig_sbkey.c | 478 ++++++++++++++++++ include/efi_config.h | 12 +- .../py/tests/test_eficonfig/test_eficonfig.py | 1 + 5 files changed, 593 insertions(+), 104 deletions(-) create mode 100644 cmd/eficonfig_sbkey.c