Struct sequoia_openpgp::types::RevocationKey [−][src]
pub struct RevocationKey { /* fields omitted */ }
Expand description
Designates a key as a valid third-party revoker.
This is described in Section 5.2.3.15 of RFC 4880.
Revocation keys can be retrieved using ValidAmalgamation::revocation_keys
and set using CertBuilder::set_revocation_keys
.
Examples
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::policy::StandardPolicy;
use openpgp::types::RevocationKey;
let p = &StandardPolicy::new();
let (alice, _) =
CertBuilder::general_purpose(None, Some("alice@example.org"))
.generate()?;
// Make Alice a designated revoker for Bob.
let (bob, _) =
CertBuilder::general_purpose(None, Some("bob@example.org"))
.set_revocation_keys(vec![(&alice).into()])
.generate()?;
// Make sure Alice is listed as a designated revoker for Bob.
assert_eq!(bob.with_policy(p, None)?.revocation_keys(None)
.collect::<Vec<&RevocationKey>>(),
vec![&(&alice).into()]);
Implementations
Creates a new instance.
Creates a new instance from the raw class
parameter.
Returns the revoker’s identity.
pub fn set_revoker(
&mut self,
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint
) -> (PublicKeyAlgorithm, Fingerprint)
pub fn set_revoker(
&mut self,
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint
) -> (PublicKeyAlgorithm, Fingerprint)
Sets the revoker’s identity.
Returns whether or not the relation between revoker and revokee is of a sensitive nature.
Sets whether or not the relation between revoker and revokee is of a sensitive nature.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for RevocationKey
impl Send for RevocationKey
impl Sync for RevocationKey
impl Unpin for RevocationKey
impl UnwindSafe for RevocationKey
Blanket Implementations
Mutably borrows from an owned value. Read more