diff options
-rw-r--r-- | examples/guide-exploring-openpgp.rs | 8 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation.rs | 6 | ||||
-rw-r--r-- | openpgp/src/cert/component_iter.rs | 4 | ||||
-rw-r--r-- | openpgp/src/cert/key_amalgamation.rs | 4 | ||||
-rw-r--r-- | openpgp/src/cert/mod.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/inspect.rs | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/examples/guide-exploring-openpgp.rs b/examples/guide-exploring-openpgp.rs index c41248d4..e70c6361 100644 --- a/examples/guide-exploring-openpgp.rs +++ b/examples/guide-exploring-openpgp.rs @@ -55,15 +55,15 @@ fn main() { for (i, ca) in cert.userids().policy(None).enumerate() { println!("{}: UID: {}, {} self-signature(s), {} certification(s)", i, ca.userid(), - ca.component_binding().self_signatures().len(), - ca.component_binding().certifications().len()); + ca.binding().self_signatures().len(), + ca.binding().certifications().len()); } // List subkeys. for (i, ka) in cert.keys().policy(None).skip(1).enumerate() { println!("{}: Fingerprint: {}, {} self-signature(s), {} certification(s)", i, ka.key().fingerprint(), - ka.component_binding().self_signatures().len(), - ka.component_binding().certifications().len()); + ka.binding().self_signatures().len(), + ka.binding().certifications().len()); } } diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs index ab6b48f9..79e481e2 100644 --- a/openpgp/src/cert/amalgamation.rs +++ b/openpgp/src/cert/amalgamation.rs @@ -96,7 +96,7 @@ impl<'a, C> ComponentAmalgamation<'a, C> { } /// Returns this component's component binding. - pub fn component_binding(&self) -> &'a ComponentBinding<C> { + pub fn binding(&self) -> &'a ComponentBinding<C> { &self.binding } } @@ -104,13 +104,13 @@ impl<'a, C> ComponentAmalgamation<'a, C> { impl<'a> ComponentAmalgamation<'a, crate::packet::UserID> { /// Returns a reference to the User ID. pub fn userid(&self) -> &crate::packet::UserID { - self.component_binding().userid() + self.binding().userid() } } impl<'a> ComponentAmalgamation<'a, crate::packet::UserAttribute> { /// Returns a reference to the User Attribute. pub fn user_attribute(&self) -> &crate::packet::UserAttribute { - self.component_binding().user_attribute() + self.binding().user_attribute() } } diff --git a/openpgp/src/cert/component_iter.rs b/openpgp/src/cert/component_iter.rs index 8df64778..de62285b 100644 --- a/openpgp/src/cert/component_iter.rs +++ b/openpgp/src/cert/component_iter.rs @@ -199,7 +199,7 @@ impl<'a, C> Iterator for ValidComponentIter<'a, C> loop { let ca = ComponentAmalgamation::new(self.cert, self.iter.next()?, self.time); - t!("Considering component: {:?}", ca.component_binding()); + t!("Considering component: {:?}", ca.binding()); let _binding_signature = if let Some(binding_signature) = ca.binding_signature() { @@ -284,7 +284,7 @@ impl<'a, C> ValidComponentIter<'a, C> { /// true, /// } /// }) - /// .map(|ca| ca.component_binding()) + /// .map(|ca| ca.binding()) /// .collect::<Vec<_>>(); /// # Ok(()) /// # } diff --git a/openpgp/src/cert/key_amalgamation.rs b/openpgp/src/cert/key_amalgamation.rs index 4c72a59c..85695f2e 100644 --- a/openpgp/src/cert/key_amalgamation.rs +++ b/openpgp/src/cert/key_amalgamation.rs @@ -336,8 +336,8 @@ impl<'a, P: 'a + key::KeyParts> KeyAmalgamation<'a, P> { } } - /// Returns this key's component binding. - pub fn component_binding(&self) -> &'a KeyBinding<P, key::UnspecifiedRole> + /// Returns this key's binding. + pub fn binding(&self) -> &'a KeyBinding<P, key::UnspecifiedRole> where &'a KeyBinding<P, key::UnspecifiedRole>: From<&'a KeyBinding<key::PublicParts, key::PrimaryRole>> { diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs index 3612113e..4b3cead3 100644 --- a/openpgp/src/cert/mod.rs +++ b/openpgp/src/cert/mod.rs @@ -444,7 +444,7 @@ impl Cert { // 1. Self-signature from the non-revoked primary UserID. let primary_userid = self.userids().primary(t).map(|ca| { - (ca.component_binding(), + (ca.binding(), ca.binding_signature() .expect("primary userid must have a binding signature"), ca.revoked()) diff --git a/tool/src/commands/inspect.rs b/tool/src/commands/inspect.rs index 548e66ae..c20b1bfa 100644 --- a/tool/src/commands/inspect.rs +++ b/tool/src/commands/inspect.rs @@ -142,7 +142,7 @@ fn inspect_cert(output: &mut dyn io::Write, cert: &openpgp::Cert, writeln!(output, " Subkey: {}", ka.key().fingerprint())?; inspect_revocation(output, "", ka.revoked())?; inspect_key(output, "", ka.key(), ka.binding_signature(), - ka.component_binding().certifications(), + ka.binding().certifications(), print_keygrips, print_certifications)?; writeln!(output)?; } |