MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / verify_self_contained

Function verify_self_contained

atomic-canonical/src/delegation.rs:256–260  ·  view source on GitHub ↗

Verify a certificate using the delegator key the document itself carries. This checks **integrity**, not trust: it proves the document was signed by whoever holds the key it names and has not been altered since. It cannot tell you that key belongs to the person you think — that is settled by comparing the recovered DID against a key you already trust (the server's registered identity, or a `deleg

(document: &Value)

Source from the content-addressed store, hash-verified

254/// agent's key, or rendering an unfamiliar certificate before deciding what to
255/// do with it. Where the delegator's key *is* available, prefer [`verify`].
256pub fn verify_self_contained(document: &Value) -> Result<Delegation> {
257 let parsed = parse(document)?;
258 let key = delegator_public_key(&parsed)?;
259 verify(document, &key)
260}
261
262// ---------------------------------------------------------------------------
263// Transport

Callers 5

from_environmentFunction · 0.85
runMethod · 0.85
executeMethod · 0.85
load_for_delegateFunction · 0.85

Calls 3

delegator_public_keyFunction · 0.85
parseFunction · 0.70
verifyFunction · 0.70