summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-09-03 12:00:44 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-09-03 12:00:44 +0200
commita9d589fc397daafebeaf631eb0343692d9c2e0d7 (patch)
tree74634ad2de6d2786ba1f37bd3f5bbee7554c144c
parent7461b8beb9833e2a3d1bce5e2506890e0eeb35ef (diff)
openpgp: Improve documentation.
-rw-r--r--openpgp/src/tpk/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/src/tpk/mod.rs b/openpgp/src/tpk/mod.rs
index 12639f95..fce5a9e5 100644
--- a/openpgp/src/tpk/mod.rs
+++ b/openpgp/src/tpk/mod.rs
@@ -906,6 +906,13 @@ impl<'a> Parse<'a, TPK> for TPK {
impl TPK {
/// Returns a reference to the primary key binding.
+ ///
+ /// Note: information about the primary key is often stored on the
+ /// primary User ID's self signature. Since these signatures are
+ /// associated with the UserID and not the primary key, that
+ /// information is not contained in the key binding. Instead, you
+ /// should use methods like `TPK::primary_key_signature()` to get
+ /// information about the primary key.
pub fn primary(&self) -> &PrimaryKeyBinding<key::PublicParts> {
&self.primary
}