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/attach-bundle-signature

Verify a CMS signature over a Rugix bundle's metadata and attach it.

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

Verify a CMS signature over a Rugix bundle’s metadata and attach it.

Inputs

bundle

Kind: file

Rugix update bundle that the signature authenticates.

signature

Kind: file

DER-encoded CMS SignedData over the bundle metadata, with encapsulated content.

certificate

Kind: file

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

Outputs

bundle

Kind: file

Authenticated Rugix update bundle.

hash

Kind: file

Bundle hash for update verification.

Execution

Environment

Rugix Bakery

Source epoch

Ignored

Output cache

Allowed

Behavior

Check a CMS signature independently of the signer that created it, then append it to the bundle. The rule applies the CMS and cryptographic checks of Rugix Ctrl with certificate as the signer certificate and requires the encapsulated content to equal the bundle’s signed metadata. It rejects CA certificates and certificates without code-signing usage, like Rugix Ctrl. It does not validate certificate validity or a certificate chain; Rugix Ctrl validates the chain to its trusted root when installing an update.

The hash output contains the bundle hash for update verification.

Example

For example, attach a signature created outside Bakery:

uses = "core/attach-bundle-signature"
inputs.bundle = { path = "release/update.rugixb" }
inputs.signature = { path = "release/signature.der" }
inputs.certificate = { path = "keys/bundle.crt" }

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