Struct sequoia_openpgp::types::RevocationKey [−][src]
pub struct RevocationKey { /* fields omitted */ }
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 ComponentAmalgamation::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(p) .collect::<Vec<&RevocationKey>>(), vec![&(&alice).into()]);
Implementations
impl RevocationKey
[src]
impl RevocationKey
[src]pub fn new(
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint,
sensitive: bool
) -> Self
[src]
pub fn new(
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint,
sensitive: bool
) -> Self
[src]Creates a new instance.
pub fn from_bits(
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint,
class: u8
) -> Result<Self>
[src]
pub fn from_bits(
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint,
class: u8
) -> Result<Self>
[src]Creates a new instance from the raw class
parameter.
pub fn revoker(&self) -> (PublicKeyAlgorithm, &Fingerprint)
[src]
pub fn revoker(&self) -> (PublicKeyAlgorithm, &Fingerprint)
[src]Returns the revoker’s identity.
pub fn set_revoker(
&mut self,
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint
) -> (PublicKeyAlgorithm, Fingerprint)
[src]
pub fn set_revoker(
&mut self,
pk_algo: PublicKeyAlgorithm,
fp: Fingerprint
) -> (PublicKeyAlgorithm, Fingerprint)
[src]Sets the revoker’s identity.
pub fn sensitive(&self) -> bool
[src]
pub fn sensitive(&self) -> bool
[src]Returns whether or not the relation between revoker and revokee is of a sensitive nature.
pub fn set_sensitive(self, v: bool) -> Self
[src]
pub fn set_sensitive(self, v: bool) -> Self
[src]Sets whether or not the relation between revoker and revokee is of a sensitive nature.
Trait Implementations
impl Clone for RevocationKey
[src]
impl Clone for RevocationKey
[src]fn clone(&self) -> RevocationKey
[src]
fn clone(&self) -> RevocationKey
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for RevocationKey
[src]
impl Debug for RevocationKey
[src]impl Hash for RevocationKey
[src]
impl Hash for RevocationKey
[src]impl Marshal for RevocationKey
[src]
impl Marshal for RevocationKey
[src]impl MarshalInto for RevocationKey
[src]
impl MarshalInto for RevocationKey
[src]impl Ord for RevocationKey
[src]
impl Ord for RevocationKey
[src]impl PartialEq<RevocationKey> for RevocationKey
[src]
impl PartialEq<RevocationKey> for RevocationKey
[src]fn eq(&self, other: &RevocationKey) -> bool
[src]
fn eq(&self, other: &RevocationKey) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &RevocationKey) -> bool
[src]
fn ne(&self, other: &RevocationKey) -> bool
[src]This method tests for !=
.
impl PartialOrd<RevocationKey> for RevocationKey
[src]
impl PartialOrd<RevocationKey> for RevocationKey
[src]fn partial_cmp(&self, other: &RevocationKey) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RevocationKey) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for RevocationKey
[src]
impl StructuralEq for RevocationKey
[src]
impl StructuralPartialEq for RevocationKey
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more