Skip to main content

Crate decision_cert

Crate decision_cert 

Source
Expand description

Load, verify and apply decision certificates: decision-certificate.v1 (spec/decision-certificate.v1.md) and decision-certificate.v1.1 (spec/decision-certificate.v1.1.md).

Verification canonicalises the JSON value exactly as received (RFC 8785, JCS), never a re-serialised struct, so number formatting can’t drift from the issuer’s. The typed Certificate is read from the same value afterwards, rejecting unknown fields.

Structs§

Audit
Band
CalibrationMap
Certificate
Every field is required; Option fields must be present (as null): a missing field is an error.
Issuer
Rule
Segment
Split
Verified
A certificate whose signature verified against a trusted key.
Window

Enums§

CertError

Constants§

ABSTAIN_ALL
abstain_below that abstains on every case (as dk calibrate writes it).
SPEC
The spec of a certificate produced by the v1 procedure.
SPECS
Every spec this verifier accepts. The fields, and so the checks, are the same for each.
SPEC_V1_1
The spec of a certificate produced by the v1.1 procedure (the per-test grid start).

Functions§

canonical
The JCS bytes of a JSON value.
certificate_id
key_id
ed25519: + the first 16 hex chars of SHA-256 of the raw public key.
timestamp
Parse the spec’s timestamp form, YYYY-MM-DDTHH:MM:SSZ, and nothing else.
verify
Verify v against keys (key id → base64url raw public key) and read it.