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

Function revocation_round_trips

atomic-canonical/src/delegation.rs:896–910  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

894
895 #[test]
896 fn revocation_round_trips() {
897 let (alice, _claude, doc) = certificate();
898 let parsed = verify(&doc, &alice.identity.public_key).unwrap();
899
900 let revocation = mint_revocation(
901 &alice.identity,
902 &alice.keypair,
903 &parsed.id,
904 Some("laptop lost"),
905 );
906 let checked = verify_revocation(&revocation, &alice.identity.public_key).unwrap();
907
908 assert_eq!(checked.delegation, parsed.id.to_urn());
909 assert_eq!(checked.reason.as_deref(), Some("laptop lost"));
910 }
911
912 #[test]
913 fn only_the_delegator_can_revoke() {

Callers

nothing calls this directly

Calls 5

certificateFunction · 0.85
mint_revocationFunction · 0.85
verify_revocationFunction · 0.85
verifyFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected