Skip to main content
Rugix Bakery 0.9.6 is here: Build rules for custom image pipelines and verified boot for EFI and Raspberry Pi. Read the release post.
Documentation

core/verify-efi

Verify an EFI signature against a certificate and attach it to the unsigned image.

Preview
You're viewing the Next docs — a rolling preview of in-development changes. The current release docs may differ.

Verify an EFI signature against a certificate and attach it to the unsigned image.

Inputs

image

Kind: file

Unsigned PE executable that the signer received.

signed

Kind: file

Signed PE executable returned by the signer.

certificate

Kind: file

PEM-encoded X.509 certificate that must verify the signature.

Outputs

image

Kind: file

Unsigned PE executable with the verified signature attached.

Execution

Environment

Rugix Bakery

Source epoch

Ignored

Output cache

Allowed

Behavior

Check an EFI signature independently of the signer that created it. The rule detaches the signature from signed, attaches it to the original image, and verifies the result against certificate with sbverify. The exported image is therefore the original executable with the returned signature. Verification fails if the signature covers a different Authenticode digest or was created with a key that certificate does not verify.

Compositions run this rule after every replaceable EFI signer, such as the efi-signer rule parameter of core/image-efi-verified.

Example

For example, check an image signed outside Bakery:

uses = "core/verify-efi"
inputs.image = { path = "boot.efi" }
inputs.signed = { path = "boot.signed.efi" }
inputs.certificate = { path = "keys/boot.crt" }

Save the invocation as build-rule.toml and run ./run-bakery bake rule build-rule.toml build/result.