summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-04-07 16:45:34 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-04-07 22:02:29 +0200
commitf1b63437a53f35bd865ae7d1a2670eba2106b030 (patch)
treef31faaa1fa3d21f5a56c746154801b0fc7a9aa0c /openpgp
parent5367e510e9c77d6c0a47c24b231b424e2b0aaf56 (diff)
openpgp: Implement VerifiedCert::revocation_keys
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/cert/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs
index 3e239e80..47841cc9 100644
--- a/openpgp/src/cert/mod.rs
+++ b/openpgp/src/cert/mod.rs
@@ -39,6 +39,7 @@ use crate::types::{
HashAlgorithm,
KeyServerPreferences,
ReasonForRevocation,
+ RevocationKey,
RevocationStatus,
SymmetricAlgorithm,
};
@@ -1496,6 +1497,19 @@ impl<'a> ValidCert<'a> {
pub fn user_attributes(&self) -> ValidComponentAmalgamationIter<UserAttribute> {
self.cert.user_attributes().with_policy(self.policy, self.time)
}
+
+ /// Returns a list of any designated revokers for this component.
+ ///
+ /// This function returns the designated revokers listed on both
+ /// this component's binding signature and the certificate's
+ /// direct key signature.
+ ///
+ /// Note: the returned list has not been deduplicated.
+ pub fn revocation_keys(&self)
+ -> Box<dyn Iterator<Item = &'a RevocationKey> + 'a>
+ {
+ self.primary_key().revocation_keys()
+ }
}
macro_rules! impl_pref {