From patchwork Tue Aug 31 02:46:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 504640 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp2369901jai; Mon, 30 Aug 2021 19:48:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyl+7PaQpp13abzfo1JJ7TNCkN8O7V+T7F5+uffAuUDt07nb9AUbUGnoqvpE8BfoMDi2dCs X-Received: by 2002:a05:6402:1455:: with SMTP id d21mr26954205edx.161.1630378101271; Mon, 30 Aug 2021 19:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630378101; cv=none; d=google.com; s=arc-20160816; b=LShLsffsv8NSOsPjaUTG07VFiLQsH5gG1UjiYDJOhFrSuKeoQigP+EM3AnVW3T0zCC QhZh/e0vOC3XtCDHdGwhl+EhIW75gvpUDSkB9uX+SU0vAvo9/QOVCPG/Szgsqz7jJvGN da/wUM9rtSUG3ssSmzux0nriqGlMazjkvCLI6MxuOLOZp3qOZHO9XUoA+TfxkPt5MAVf GiwGNTTp3+NfAx3iYJ8cNl7cu3o/xVWjQNDEGxz8uJ5jtwPwMkuDa0d4sPNqBNXe1/lB bYLuqyMnfXQJRsE9VS6o5uugR9kfBsNWjaljiLkkqU+U4brPev2P83OGmI0ufrgmoT+p npJA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A0OmgO+gkbqwJPJ51g+lgdc+PN0XtHLnnILcf2jZHzM=; b=jWe1hyHP18hmnWcrqIJ/DQtmJYcoWOTz7A3taSwFEyP0UduXLRybDQuqXbJc7GKH3y Olh+ACtXSnOs2C2gwgPVmjzbFYH5mvVkjr07o+IRGQNLPX2BUxNyJSx0c2cgR4uXlFq2 VOcu6NNR5u2FgLdLNobjoDP1q4fEsWP6NQREI84es3LufN3M0DsxlGCrkVaUeONNeLLY ratFx9xhGl+cKIXusc0NY0w5J3Ec37lRi2A76Y1sJ0tIdwa+5QGnO0UEDUzVxxbPhXEz zLGjMrxlUKtrSe1QKSyEuDHBZx8xEMx7pGKbF+V/elKkP2lsTatMzQBFAW338s3vKc/C FU9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WwKFcyya; 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 c28si9745075ejj.414.2021.08.30.19.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 19:48:21 -0700 (PDT) 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=WwKFcyya; 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 3383C833F4; Tue, 31 Aug 2021 04:48:20 +0200 (CEST) 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="WwKFcyya"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B5B4D83408; Tue, 31 Aug 2021 04:47:49 +0200 (CEST) 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-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (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 AF77983402 for ; Tue, 31 Aug 2021 04:47:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x434.google.com with SMTP id u6so13155559pfi.0 for ; Mon, 30 Aug 2021 19:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A0OmgO+gkbqwJPJ51g+lgdc+PN0XtHLnnILcf2jZHzM=; b=WwKFcyyaF0hCLqAPWod/vEfKgcgKUQFu42bpvCD2L7uuXUf/yOaoWwwfEZNJvv8ra5 qVQPYbgnR+SCOhTMEs6iGKOswZM0E6d1rcQi8djJU5/eNO+waLSQeKYrRMi0OFv0doCw YYVz1yMCn0fDatnImDNsj3mTccGsBDBCbs6dmq7/48CmhbfSvpqMi9KTUk8Y4EwjJqYF 9qkNHTDRyzbBy2LCDWrzYn4vV5iL88VPxo4CGjSx7S3v9Tb+HbFI8FeRL7kyPG5nfPcM IVib7/6jEs44iSXpmi2NvfrFIRTVkRoySJ+jd/UA4/7SOlYr54zg5IhNQhUdCEDm2XaD A6nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A0OmgO+gkbqwJPJ51g+lgdc+PN0XtHLnnILcf2jZHzM=; b=iBnKDOjh8IQ3MlS2K5XXWNGdS96x2yv7Q4lsaaEnyDSKraSHWohFFt2W2ecLHWcJ6P b/2EqXxG61cxT8nj1j2PCnYNB0/b9sK+yzzLaxLKNfLfOgiHTn3v8E6TQCOQkT6lLTJc F4oxRcYmgP2fZunXi2a+IUBOGmCFNJMNUPf21KU3kP0xx9hjSojEVSt8CxOfSNOQlu+B Q3Tf8MT14UCBOE5meMogufBOgAEU3d9UMmLzoGDStJjQ4Q0Bkj9JNBE5OhBCXTCEGM98 NuGkDPICosnYGuzKvJejy+s0YhKZTVdIlj1twFzbuuwHmMrafXO1n6o1A2pgxOyTDDHh Rckw== X-Gm-Message-State: AOAM533/sXcmqiNLxOBaCiiaaILRJLbx+6XGN8yvE62xSiAYTTDdLi6R LxKT34vPzNpMGyWFrLR37afMqioZ6hn7pA== X-Received: by 2002:a63:a4a:: with SMTP id z10mr24297218pgk.329.1630378058078; Mon, 30 Aug 2021 19:47:38 -0700 (PDT) Received: from localhost.localdomain (p784a44f4.tkyea130.ap.so-net.ne.jp. [120.74.68.244]) by smtp.gmail.com with ESMTPSA id g2sm219649pfr.35.2021.08.30.19.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 19:47:37 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v3 3/5] doc: update UEFI document for usage of mkeficapsule Date: Tue, 31 Aug 2021 11:46:57 +0900 Message-Id: <20210831024659.53464-4-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210831024659.53464-1-takahiro.akashi@linaro.org> References: <20210831024659.53464-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Now we can use mkeficapsule command instead of EDK-II's script to create a signed capsule file. So update the instruction for capsule authentication. Signed-off-by: AKASHI Takahiro --- doc/develop/uefi/uefi.rst | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) -- 2.33.0 diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index 64fe9346c7f2..5ccb455da984 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -347,23 +347,20 @@ and used by the steps highlighted below:: -keyout CRT.key -out CRT.crt -nodes -days 365 $ cert-to-efi-sig-list CRT.crt CRT.esl - $ openssl x509 -in CRT.crt -out CRT.cer -outform DER - $ openssl x509 -inform DER -in CRT.cer -outform PEM -out CRT.pub.pem - - $ openssl pkcs12 -export -out CRT.pfx -inkey CRT.key -in CRT.crt - $ openssl pkcs12 -in CRT.pfx -nodes -out CRT.pem - -The capsule file can be generated by using the GenerateCapsule.py -script in EDKII:: - - $ ./BaseTools/BinWrappers/PosixLike/GenerateCapsule -e -o \ - --monotonic-count --fw-version \ - --lsv --guid \ - e2bb9c06-70e9-4b14-97a3-5a7913176e3f --verbose \ - --update-image-index --signer-private-cert \ - /path/to/CRT.pem --trusted-public-cert \ - /path/to/CRT.pub.pem --other-public-cert /path/to/CRT.pub.pem \ - +The signed capsule file can be generated by using tools/mkeficapsule. +To build this tool, enable:: + + CONFIG_TOOLS_MKEFICAPSULE=y + CONFIG_TOOLS_LIBCRYPTO=y + +To generate and sign the capsule file:: + + $ mkeficapsule --monotonic-count 1 \ + --private-key CRT.key \ + --certificate CRT.crt \ + --index 1 --instance 0 \ + [--fit | --raw ] \ + Place the capsule generated in the above step on the EFI System Partition under the EFI/UpdateCapsule directory