Expand description
The C ABI for signed firmware updates.
These functions wrap [pamoja_update] for callers that reach the SDK through
the flat C boundary. Two audiences meet here. A build server signs a manifest
and a delegation, which is all value math over
PamojaManifest and PamojaDelegation. A device decides what to accept,
which needs the slots it keeps images in, so an updater crosses as an opaque
handle.
The updater is built over the in-memory slot store. The Rust crate takes any store through a trait, and a trait cannot cross a C ABI, so a caller wiring real flash writes that in Rust; what crosses here is the whole of the decision logic, which is the part that has to be right.
Structs§
- Pamoja
Boot - The decision a device made at boot, already recorded before it was returned.
- Pamoja
Delegation - A statement, signed by the anchor, that a second key may sign releases.
- Pamoja
Device - Who a device is, and whose signature it trusts.
- Pamoja
Image Verifier - An opaque handle that hashes an image as it arrives.
- Pamoja
Manifest - What a release says about itself, and what a device checks it against.
- Pamoja
Slot Record - The record a device keeps about one slot, durable across a reboot.
- Pamoja
Updater - An opaque handle to a device slots and the rules applied to them.
Enums§
- Pamoja
Boot Action - What a bootloader should do with what it found.
- Pamoja
Slot State - What a device believes about one slot.
Constants§
- PAMOJA_
UPDATE_ DIGEST_ LEN - The length in bytes of an image digest.
- PAMOJA_
UPDATE_ FORMAT_ RAW - The payload format meaning the payload is the image itself, byte for byte.
- PAMOJA_
UPDATE_ ID_ LEN - The length in bytes of a vendor or device-class identifier.
- PAMOJA_
UPDATE_ STRUCTURE_ VERSION - The manifest structure version this build writes.
Functions§
- pamoja_
delegation_ ⚠open - Opens a signed delegation against the anchor that should have signed it.
- pamoja_
delegation_ ⚠sign - Signs a delegation, naming a release key the anchor stands behind.
- pamoja_
envelope_ ⚠body - Copies out the signed body of an envelope, without checking the signature.
- pamoja_
envelope_ ⚠verify - Verifies an envelope against a key and reads the manifest inside it.
- pamoja_
image_ ⚠digest - Creates a verifier that hashes an image against what a manifest declares.
- pamoja_
image_ ⚠verifier_ finish - Settles an image against its manifest, consuming the verifier.
- pamoja_
image_ ⚠verifier_ free - Releases a verifier handle that will not be settled.
- pamoja_
image_ verifier_ new - a payload format this build cannot apply.
- pamoja_
image_ ⚠verifier_ update - Takes the next piece of the image.
- pamoja_
manifest_ ⚠decode - Reads a manifest body back from its bytes.
- pamoja_
manifest_ encode - Encodes the body of a manifest, which is the part a signature covers.
- pamoja_
manifest_ ⚠sign - Signs a manifest into the envelope that is offered to a device.
- pamoja_
updater_ ⚠adopt - Adopts a delegation, so releases signed by the key it names are accepted.
- pamoja_
updater_ ⚠begin - Checks a manifest and opens the slot it names for a transfer in pieces.
- pamoja_
updater_ ⚠confirm - Confirms the pending image, so it will be run from now on.
- pamoja_
updater_ ⚠delegation - Reads the delegation an updater currently honours.
- pamoja_
updater_ ⚠finish - Finishes an opened image and marks the slot bootable if it matched.
- pamoja_
updater_ ⚠free - Releases an updater handle.
- pamoja_
updater_ ⚠installed_ sequence - Reads the highest sequence number the device already holds.
- pamoja_
updater_ new - Creates an updater over a device slots.
- pamoja_
updater_ ⚠on_ boot - Decides what to run, and records that decision before returning it.
- pamoja_
updater_ ⚠progress - Reports how much of an opened image has arrived.
- pamoja_
updater_ ⚠provision - Records that a slot already holds a confirmed image at a sequence number.
- pamoja_
updater_ ⚠revert - Fails the pending image and goes back to the confirmed one.
- pamoja_
updater_ ⚠slot_ count - Returns how many slots a device has.
- pamoja_
updater_ ⚠slot_ record - Reads what a device believes about one slot.
- pamoja_
updater_ ⚠stage - Checks a manifest and stages an image that is already held whole.
- pamoja_
updater_ ⚠write - Takes the next piece of an image opened with
pamoja_updater_begin.