Skip to main content

Module manifest

Module manifest 

Source
Expand description

The manifest of an agent archive: what is in it, with a hash per part and per chunk, and the signature of the computer that wrote it (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER section 4).

The manifest is the only thing a reader trusts before it has read a part: it names every part, its size and the SHA-256 of each 256 KiB chunk of it, so a part is checked chunk by chunk as it is read and a chunk can be checked alone when the archive travels in chunks. It holds no map, only structs and lists, so serializing it twice gives the same bytes: that is what the signature covers.

Structs§

AgentInfo
The agent the archive is of.
Manifest
Part
One file of the archive.
Signature
The signature of the manifest by the writing computer’s instance key.
Source
The computer that wrote it.

Enums§

SignatureState
Whether the manifest’s signature verified.

Constants§

CHUNK_BYTES
The size of one chunk of a part (the last one may be shorter).
FORMAT
The format this build writes and the newest it reads.
KIND
The kind of an agent archive. A bundle archive has a different one and neither importer takes the other.
MANIFEST_NAME
The name of the manifest inside the archive file. No part may have it.
SIGN_DOMAIN
What the signature covers besides the manifest, so a signature made here cannot be read as one made for anything else the same key signs.

Functions§

chunk_count
The number of chunks a part of size bytes has.
valid_part_path
Whether path is a name a part may have: relative, /-separated, plain components, nothing a file system reads as something else (a parent, a drive, a device name, a trailing dot or space).