From patchwork Wed Nov 16 10:28:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 625085 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp187005pvb; Wed, 16 Nov 2022 02:26:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf73XG5DHQH6YuPForFbh+BzpOa/orBpjFFXx/hzSh1MnO8dXf/m3Bhp+OudGSazWNUIQVpZ X-Received: by 2002:a05:6402:1004:b0:461:53b0:2ac0 with SMTP id c4-20020a056402100400b0046153b02ac0mr17901036edu.153.1668594404063; Wed, 16 Nov 2022 02:26:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668594404; cv=none; d=google.com; s=arc-20160816; b=u35pYAUUJhQgxmHx0HDcmHYky686GaETaqkFyBxjiZP1J2P0HXPSOzqG1lvcFzWew/ KCyIUJtOjpDZyb3NSLCkOfa6p6LbPe31CbtpXS0NAMUXvu2F8mOTjGiASGBF0FiW0GZs fTbnWo6UxOpTnxPpwXb5eVM0OJSQ8hStgc/TMPrflydxLTkUXiaEF9PhbdVY0JfYtEgw NpNvHzSCPZ/M7wG5yNC4olHbgSIrVElIVaLx9G8qhyulkwWGTer2QrTzU2Tl+EVVOZLW b5W3FZ060jPvGmvF+GR648W7aICTiXPkR5wL0hwI7UqIGzfxo1RhODIu8AmXAyTmYl4A QNUQ== 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=V/CjXTdIYm3OpR72cSI5KSTzCZE8FSJ5FhD+4JFx1Gk=; b=DhdLJMdEbN5RYZ7pLdXiiPja/JEFJGJIOWqzffyrnSxx0WIDilaujW5fuvU4msB7Hb ebgpakMVctOYiqtVac9vuAdUCCdC0XjQ/oNFTj9ahH0okzuvmjK3lUwz5cJoUo3E2057 mfTEYgdW8kxbV6TeM7roJnASqLI4nNLoW27gJ5aFHszBTBmbdJYN191Zp+X4nEHAJtRP 490NEK/1WWviCcpiswqYB8OHSe3vsf2eNwbTEtzCjQvA3IOZ5cAkFI57olmCCgbZav3L t1m7gCfxMxeAytp90GY+CbROKPZT7BFOwgb934uv4YUytAdC3TlJeaNJQNNndhGZFND0 E2aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OXYQ1Y5d; 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 gb17-20020a170907961100b0078d1faeb619si15677947ejc.777.2022.11.16.02.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 02:26:44 -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=OXYQ1Y5d; 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 9AC71851C2; Wed, 16 Nov 2022 11:26:40 +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="OXYQ1Y5d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 641D6851B1; Wed, 16 Nov 2022 11:26:39 +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 A9103851B1 for ; Wed, 16 Nov 2022 11:26:36 +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 y4so16027278plb.2 for ; Wed, 16 Nov 2022 02:26:36 -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=V/CjXTdIYm3OpR72cSI5KSTzCZE8FSJ5FhD+4JFx1Gk=; b=OXYQ1Y5dJ3zCdBBzrGsYlFGaOsyt0ozLeVd3UJo38pfqxa2TO2ZUJIZCGwS3G2S6ds uSG/gZ44vunidtzOpa4K9LgMzJOZAwSOx/ziqB26spn/kwOBoHV9wTcZ/sFiAKa3ifSe bSk0zIYM2ixxugjWTiyQya8I3eY+XmCH5vUkXjHyWXLCy6x3QeGWRvviFMm903iMILPg pXO7m9BxUF/4GisK/uvPWD6BP7v6MUKm+Tjo0uSJwrm0Yz4C6XGhGHsLqma8jLYOP4in uFSywqGa+OVgw7zuWXk+cw1SjJGZh1a1sqc5324qAn6Tej+3u6mqkTahG7xF7wXOlMIm Cg9w== 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=V/CjXTdIYm3OpR72cSI5KSTzCZE8FSJ5FhD+4JFx1Gk=; b=HF07AJ4JahURbfI3AXCktCYJb/Wb2SUSCbNuOSCffAJ54pxCx5Udb4pZi90qiUx8bX +4cAm0ZIVqXPttgCLX3GJV57t+p2w5D/bWAzTX/WxhQLeG8oB2aj8OB+278pDS3poHUC PKCfTfFKiIU1RWTd57wfoNqKWQoUH5DHfJ+VEvoBwq2U+dWs4TgAtT7p/qpuh8nnlATA /eZikC1Vyu9jG1WAwk6Fp4wLR7If+USdS/MwTt7Drv3uai/NOOJ3Nqtmi+PNaegzv77N CcCtMBOLVNFUFsQ79TU3A+IXvsUQfaIsTnrcr/r7w7X+sl/eLGpexvk0Za2guRSgLg+T FwUA== X-Gm-Message-State: ANoB5plAj62p7SYt6+DOCFo+Fmyw0R+1cjjwiuRL0ddK3u5t1o3KkWrW g0TEfecwFLWMNlBYIuvCyl1aPyhL5rO/qg== X-Received: by 2002:a17:902:b186:b0:185:4ec3:c708 with SMTP id s6-20020a170902b18600b001854ec3c708mr8378598plr.60.1668594394579; Wed, 16 Nov 2022 02:26:34 -0800 (PST) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id h7-20020a170902f7c700b00186b945c0d1sm11763994plw.2.2022.11.16.02.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 02:26:33 -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 v9 0/5] eficonfig: add UEFI Secure Boot key maintenance interface Date: Wed, 16 Nov 2022 19:28:15 +0900 Message-Id: <20221116102820.21021-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_v9 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 | 482 ++++++++++++++++++ include/efi_config.h | 12 +- .../py/tests/test_eficonfig/test_eficonfig.py | 1 + 5 files changed, 597 insertions(+), 104 deletions(-) create mode 100644 cmd/eficonfig_sbkey.c