Expand description
Signature verification.
Two layers are kept deliberately separate:
- Cryptographic layer —
verify_signaturechecks a single detached PGP signature against the artifact bytes using the publisher’s public key. It is a pure “does this signature hold?” answer with no notion of trust. - Policy layer —
checkdecides whether the set of signers that produced valid signatures intersects with the user’sTrustStore. Only the policy layer can produceError::UntrustedPlugin.
§Backend
The cryptographic layer prefers the in-process RNP library (Ribose’s
OpenPGP implementation, loaded via libloading). When librnp is
not loadable — e.g. it isn’t installed on the host yet — the
verifier falls back to shelling out to gpg --verify. The fallback
exists so the trust model is enforceable in environments without a
pre-built librnp; once rnp-rs (see TODO.roadmap/13-rnp-rust-binding.md)
ships, the fallback will be removed and RNP becomes the sole backend.
See TODO.roadmap/06-module-registry.md for the trust model
(publisher identity = PGP key registered in publishers/, artifact
signature = detached PGP in sigs/).
Enums§
- Verification
- The outcome of a signature check.
Functions§
- check
- Apply the trust policy: the artifact is trusted iff at least one of
signersis present intrust. ReturnsError::UntrustedPluginwhen unverified andallow_untrustedis false. - verify_
signature - Verify a single detached PGP signature.