From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADE3FC432BE for ; Thu, 2 Sep 2021 09:22:26 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF31060F6C for ; Thu, 2 Sep 2021 09:22:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF31060F6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 94C4582D3C; Thu, 2 Sep 2021 11:22:22 +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="B0j2q37i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1AF8982BF6; Thu, 2 Sep 2021 11:22:20 +0200 (CEST) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 73513832AB for ; Thu, 2 Sep 2021 11:22:14 +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-pl1-x62c.google.com with SMTP id d17so774276plr.12 for ; Thu, 02 Sep 2021 02:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=wh0XvtZG+uwQs/sdZBuyoSDFyImeG09WtKZDpeW+BkY=; b=B0j2q37iDis2ODbzBlWhPpn/ud8SLr5B4HqkttQP3nQKcWBvgGtlZgw/JL4bRyvK0a ErDWZ6OoXDcc9oSn5v8UMBlRY9y3lMaKYytZQVruOrfAwxxlcmhkofGfgoqNm9ucOgxc fB0j4N367nGpmGEuV4WktigE8fLnl3zNKvs2bZ/xSbl4thqTXmzyR09/szU/6PlpRj9l +dzPgZ+HueOcwX7UJBgLN5ldLxewdbL+kT5l+sCUgcoLx6QKV8IVpmNtLwkycpFLBBF7 YO21wlykq3+XzVjtbDvZ+epSUshUsTUZdhur5WAj6T9LLEjbUatPbBruOxFxO5t1PyII RCPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=wh0XvtZG+uwQs/sdZBuyoSDFyImeG09WtKZDpeW+BkY=; b=AMpEXJ76aolaMoAyxQSMOelJ6J6GfZDDs8GrmmGQi8C1/kP9qVnERfERsayLchjtxR w+680XpYmuNbrJvw2rm+QmfD/V5odfrdVM+hG8nykVCN7d3yNSzIOUkg/UrmOJnqYt9P fU3RvbJqSgFwM4tpmuH5TEogdK9VELWv+yCmxp7S+dPErp7MJagGwcrdnB8hoDrw64Yq 1EHqCuQTug5Y7TZoX2isyPOCCCQxXC9wafSn5oCLmoeOpKcMokYze8d64ZxzNym2D7M0 Z769WLIxZ1+NSBsVeriWTg00tsLcmYAbjD+NAdQz46CU1YTf9JjUEnoKbHBWYVUjS9A4 5CBQ== X-Gm-Message-State: AOAM531RlYKEbAv2Rc3UiUpre1vK5ugkPSAvoaBqC6zSeDbRD3RyApRh Dn3by3ycH99gRiV2f9jWmzMu8A== X-Google-Smtp-Source: ABdhPJxFpxTWdVa9TtAapTDzjfgvZyXzH0CXCy8cKNwmvUCXg5slKoX1Vadg72VCoFDhMJB3v5e3pQ== X-Received: by 2002:a17:902:b190:b029:12d:487:dddc with SMTP id s16-20020a170902b190b029012d0487dddcmr2089864plr.24.1630574532557; Thu, 02 Sep 2021 02:22:12 -0700 (PDT) Received: from laputa (p784a44f4.tkyea130.ap.so-net.ne.jp. [120.74.68.244]) by smtp.gmail.com with ESMTPSA id u13sm1557235pfi.121.2021.09.02.02.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 02:22:11 -0700 (PDT) Date: Thu, 2 Sep 2021 18:22:07 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de, agraf@csgraf.de Subject: Re: [PATCH v3 3/5] doc: update UEFI document for usage of mkeficapsule Message-ID: <20210902092207.GD71098@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de, agraf@csgraf.de References: <20210831024659.53464-1-takahiro.akashi@linaro.org> <20210831024659.53464-4-takahiro.akashi@linaro.org> <77787379-8f94-bba7-4a76-029844cc70d9@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77787379-8f94-bba7-4a76-029844cc70d9@gmx.de> 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 On Tue, Aug 31, 2021 at 08:07:18AM +0200, Heinrich Schuchardt wrote: > On 8/31/21 4:46 AM, AKASHI Takahiro wrote: > > 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(-) > > > > 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 ] \ > > + > > Patch 1 allows signed and unsigned capsules. So both should be described > here. Sughosh's original doc doesn't have a description for *unsigned* case, but adding some is not a big deal. -Takahiro Akashi > Best regards > > Heinrich > > > > > Place the capsule generated in the above step on the EFI System > > Partition under the EFI/UpdateCapsule directory > > >