summaryrefslogtreecommitdiffstats
path: root/store/src
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-01-29 15:07:38 +0100
committerNeal H. Walfield <neal@pep.foundation>2019-01-29 15:48:24 +0100
commitfc514ce424f71f0146f70727a548ec8009a06f1b (patch)
tree430a0ca5dec6625258b0747ce11faae75b08d981 /store/src
parente53bddfb440f2b26e27c4c911d446f39db51cd09 (diff)
store: Fix documentation.
- In a1eba557ff62f09bef2c7e379a238c643ac240d7, I changed the store to insert all subkeys into the key_to_keyid table. Update the documentation to reflect this change.
Diffstat (limited to 'store/src')
-rw-r--r--store/src/lib.rs26
1 files changed, 14 insertions, 12 deletions
diff --git a/store/src/lib.rs b/store/src/lib.rs
index 9172ee7c..ec977b08 100644
--- a/store/src/lib.rs
+++ b/store/src/lib.rs
@@ -218,10 +218,7 @@ impl Pool {
/// Looks up a key in the common key pool by (Sub)KeyID.
///
- /// The KeyID may also reference a signing- or
- /// certification-capable subkey. The reason for this restriction
- /// is that anyone can attach any subkey to her TPK, but signing-
- /// or certification-capable subkeys require back signatures.
+ /// The KeyID may also reference a subkey.
///
/// # Example
///
@@ -240,16 +237,24 @@ impl Pool {
/// # .ipc_policy(IPCPolicy::Internal)
/// # .ephemeral().build()?;
/// # let tpk = TPK::from_bytes(
- /// # include_bytes!("../../openpgp/tests/data/keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp"))
+ /// # include_bytes!("../../openpgp/tests/data/keys/neal.pgp"))
/// # .unwrap();
/// Pool::import(&ctx, &tpk)?;
///
/// // Lookup by the primary key's KeyID.
- /// let key = Pool::lookup_by_subkeyid(&ctx, &KeyID::from_hex("069C0C348DD82C19")?)?;
+ /// let key = Pool::lookup_by_subkeyid(&ctx, &KeyID::from_hex("AACB3243630052D9")?)?;
/// assert_eq!(key.tpk()?.fingerprint(), tpk.fingerprint());
///
- /// // Lookup by the subkey's KeyID.
- /// let key = Pool::lookup_by_subkeyid(&ctx, &KeyID::from_hex("22E3FAFE96B56C32")?)?;
+ /// // Lookup by the signing subkey's KeyID.
+ /// let key = Pool::lookup_by_subkeyid(&ctx, &KeyID::from_hex("7223B56678E02528")?)?;
+ /// assert_eq!(key.tpk()?.fingerprint(), tpk.fingerprint());
+ ///
+ /// // Lookup by the encryption subkey's KeyID.
+ /// let key = Pool::lookup_by_subkeyid(&ctx, &KeyID::from_hex("C2B819056C652598")?)?;
+ /// assert_eq!(key.tpk()?.fingerprint(), tpk.fingerprint());
+ ///
+ /// // Lookup by the authentication subkey's KeyID.
+ /// let key = Pool::lookup_by_subkeyid(&ctx, &KeyID::from_hex("A3506AFB820ABD08")?)?;
/// assert_eq!(key.tpk()?.fingerprint(), tpk.fingerprint());
/// # Ok(())
/// # }
@@ -451,10 +456,7 @@ impl Store {
/// Looks up a key by (Sub)KeyID.
///
- /// The KeyID may also reference a signing- or
- /// certification-capable subkey. The reason for this restriction
- /// is that anyone can attach any subkey to her TPK, but signing-
- /// or certification-capable subkeys require back signatures.
+ /// The KeyID may also reference a subkey.
///
/// # Example
///