From patchwork Thu Nov 10 08:30:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 623321 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp761148pvb; Thu, 10 Nov 2022 00:29:19 -0800 (PST) X-Google-Smtp-Source: AMsMyM4LdFEcEia8bWx9l8xjhnvJ6EOicy666iJsnOpEYvB0Cb5kz4sifVNyVzI5Sk2k/Clc++oo X-Received: by 2002:a17:906:8a6a:b0:79e:2efe:e0 with SMTP id hy10-20020a1709068a6a00b0079e2efe00e0mr60007796ejc.401.1668068959111; Thu, 10 Nov 2022 00:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668068959; cv=none; d=google.com; s=arc-20160816; b=W+uIUdd11122dKAq0Ui3NVbwgYU9w8yfifL34UNnKMgWvDsTZ26Yz09E/qLdzmJhy6 8e3YENvSXnC2MtQ1ktsXO8c7nmJduHiQgT0HqkgsEj5aYl0ZQp0/mAxCmwdZihZMqhu6 akiRvKNiY0/8gYQW3Eswfraxif4YcUeKmGSaU4fQaVQb/NDCRgL5e8z5mB0hsvHEbSRr 9riUGKg1m9nmT76kJXYr7Bih+XVrAe47y4dvHfOJW3BfBLN/nX8mkZFVzq7LnZk98pEb SXZrNvgVusM70q/ZH0QgaGxhbWGB8VhyzGclPJM3ZAKQ3nZ67XVBKvpoAJPAQY+nvAib WGuw== 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=hgblTCzjfSR0eZ1gXwrfDBG2L1vSoEOllLdGUB4S+hs=; b=f3VfUUrr8nKOcYDi9c2lot3eMSGigIZ9eN9BJG5a/sweDvCJtsIoYRDsaOsmNKxZR4 7/Z+RkJfbhfZoDeyj6z0oZiP0W5jYsHejZxgLq3n8KGr4CzWe0l9sHWQMV/Bsjhzs/dH YzZ4BYZlERWNc4npAqPb4PB+4AHunMTwWmKFhoeqsqrVmET29Z/z0jiUDK9+iKmWJr9N HOgwpOhhp9evwPvKWkFKAYR8ezej1lucevrWhDLxofWaPKx94nPyaUgwFiRBrJCkPmtW lTZ6o4soAc1tODaAKW7ISZfJv+W0sCCHRpHFh+d2XhFr1tY17AlBAfQIXnYvhYkCYPE3 qdog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmUMALwe; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id dt8-20020a170907728800b0078b2fed72b9si13248376ejc.111.2022.11.10.00.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 00:29:19 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmUMALwe; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 6F95985113; Thu, 10 Nov 2022 09:29:16 +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="XmUMALwe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 63623850DA; Thu, 10 Nov 2022 09:29:15 +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-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (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 24FF0850FB for ; Thu, 10 Nov 2022 09:29:12 +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-pj1-x102a.google.com with SMTP id z5-20020a17090a8b8500b00210a3a2364fso5346822pjn.0 for ; Thu, 10 Nov 2022 00:29:12 -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=hgblTCzjfSR0eZ1gXwrfDBG2L1vSoEOllLdGUB4S+hs=; b=XmUMALweEMhrlP4InwrIbO/TuDzjjx4B8vUsnUm8uNjCZk9pNYoejquz4aD6lO/0ai 6/5+O/6O+JgPIq4rcwUpXCNooW7J61JuGINpso4cpzrb7eZnadBGB8zqNrMbi/O1VT5V i2x5mf4vgHUXjyxCLr3fx/5tocQRFHK3dPcV4r7x5hSv23/gQn/Nt93zHrNK70EGz3lt W8o6NckjjCSt+XtrQxJeSsnJrMMk0/Qu8UAxShE+ZfNBSbvjtpD4cORROXniCfaVhILR u7FF1pnjV1fIH3G6oTmthlofRu4JnSXezff1cnVrMiJfTIakOIZPysoOgLtTJUdfgUmq KvLQ== 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=hgblTCzjfSR0eZ1gXwrfDBG2L1vSoEOllLdGUB4S+hs=; b=DWaoKAwWHIrYmi2xMXP917QBfqa0c2roYlowbsW2+Gh+p8KVWsoLd8V0XzuL1Qr9J2 XK3sfCVpiwamlgwdu4PJtgH4Ttk9aVuP74MM77Cm3GEtma0O+OTyyX2pjG7dNjZv1zBq R8MKXMxpLXRnZ7aJ4MJTR7OT8ZfxzU5rDP0laB704gXHVgSgnAgjX/D/A3Lv/XDWXybE d8nCvRf3SGkH6Ax/k7hzyLjpVMTKid7cjMM3jWR3l/DLPJHrYRCIqoYfqOmaLZc5FP8c hsKSP5W5b3BemooqHT5Er0TK7AMow5XuoIKOqaulX5JIwrleRavZrT1LI5NfF9ZYsJ1J ol6A== X-Gm-Message-State: ACrzQf3uMPfttxuF2eMU1ATneEjrC1m63Xk1QLJZTZLRsdg2z80obt+J 0nzUIIGaQvx/bbolA3SNVsWzS7C4UIoFzQ== X-Received: by 2002:a17:903:40c9:b0:186:e377:f4e2 with SMTP id t9-20020a17090340c900b00186e377f4e2mr64386789pld.101.1668068949889; Thu, 10 Nov 2022 00:29:09 -0800 (PST) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id b1-20020a170903228100b00176ba091cd3sm10638194plh.196.2022.11.10.00.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 00:29:09 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Etienne Carriere , Masahisa Kojima Subject: [PATCH v8 0/5] eficonfig: add UEFI Secure Boot key maintenance interface Date: Thu, 10 Nov 2022 17:30:49 +0900 Message-Id: <20221110083054.11950-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_v8 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 | 480 ++++++++++++++++++ include/efi_config.h | 12 +- .../py/tests/test_eficonfig/test_eficonfig.py | 1 + 5 files changed, 595 insertions(+), 104 deletions(-) create mode 100644 cmd/eficonfig_sbkey.c