Skip to main content

Module lease

Module lease 

Source
Expand description

Lease and key-set verification, renewal and the service clock offset.

Trust chain: the root key (compiled in or [cloud] root_key) signs the key set; a key of the set signs the lease. A stored lease is re-verified on every load, so a tampered lease.json is never trusted.

Structs§

VerifiedLease
A lease that passed verification, with the service clock offset.

Constants§

ROOT_MISMATCH
The refusal of a key set another root signed; cloud connect names which root it used (Cloud task lean-ctx #2).

Functions§

load_lease
The stored lease, re-verified against the stored key set and root.
renewal_key_set
The key set a renewed lease is checked against and stored with: the one the stored lease was checked against while it holds the lease’s kid, else the stored key set v3 (a C0 2.x Cloud signs leases with a key of purpose policy from it). None when neither verifies with that key.
store_lease
Persist a verified lease and the key set it was checked against.
verify_keyset
Verify a key set (raw JSON, as received) against the root key.
verify_lease
Verify a lease envelope against a verified key set.
verify_lease_v3
Verify a lease envelope of a C0 2.0 Cloud against key set v3: kid is the key id of a key of purpose policy, valid when the lease was issued (keyset_v3 vectors, lease_cases).