public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, james.last@amd.com
Subject: Re: [edk2-devel] Capsule validation tool?
Date: Thu, 21 Nov 2024 11:41:34 -0700	[thread overview]
Message-ID: <6011bbdb-028d-46c1-9e52-2b55819686de@bsdio.com> (raw)
In-Reply-To: <i7ec.1731957323573429059.ah7U@groups.io>

Not sure if you want to use the same tool again, but GenerateCapsule can 
be used to validate them too - it runs 'openssl smime -verify'. e.g.:


bcran@delano:/tiano> GenerateCapsule --signer-private-cert 
certs/cert.pem --other-public-cert certs/intermediate.pub.pem 
--trusted-public-cert certs/root.pub.pem -d 
./Build/ComHpcAlt/comhpcalt_host_debug_24.11.21-10.cap -o out.bin
bcran@delano:/tiano>


When there's no output verification passed. Otherwise a message will be 
displayed (though the exit code is still 0, which I guess is a bug). If 
I edit the capsule file or pass in the wrong certificate file, then I get:

Verification failure
E06A93BAFFFF0000:error:10800075:PKCS7 routines:PKCS7_verify:certificate 
verify error:crypto/pkcs7/pk7_smime.c:296:Verify error: unable to get 
local issuer certificate

GenerateCapsule: warning: payload verification failed Index = 1
GenerateCapsule: error: openssl failed.


Otherwise, similar to Mike's suggestion of using CapsuleApp you can also 
build a cabinet file and run e.g. "fwupdtool install 
comhpcalt_host_debug_24.11.21-10.cab" from the test machine to check if 
the verification succeeds and the capsule gets installed.


Rebecca


On 11/18/24 12:15 PM, james.last via groups.io wrote:
> We're working on a tool similar to GenerateCapsule but uses HSM-based 
> keys to perform the signing instead of a local key file. Is there a 
> standalone tool or recommended method to validate the capsules are 
> generated correctly using the cert chain?


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120812): https://edk2.groups.io/g/devel/message/120812
Mute This Topic: https://groups.io/mt/109651149/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      parent reply	other threads:[~2024-11-21 18:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 19:15 [edk2-devel] Capsule validation tool? james.last via groups.io
2024-11-18 19:58 ` Michael D Kinney via groups.io
2024-11-21 18:41 ` Rebecca Cran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6011bbdb-028d-46c1-9e52-2b55819686de@bsdio.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox