diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-03-22 13:19:04 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-03-22 14:23:40 +0100 |
commit | 0d0e785f66b3c7a57e842202019857c7cfbd6ce0 (patch) | |
tree | 0c6677a837335905442ee0792d7d01e6c477d969 | |
parent | 32d9e9f4908c74a9c41a5a3bd0a700c56edc558a (diff) |
openpgp: Fix documentation, we need a signing key for sign_message.
-rw-r--r-- | openpgp/src/packet/signature.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/packet/signature.rs b/openpgp/src/packet/signature.rs index 3a525348..3176916d 100644 --- a/openpgp/src/packet/signature.rs +++ b/openpgp/src/packet/signature.rs @@ -1513,12 +1513,12 @@ impl SignatureBuilder { /// # fn main() -> openpgp::Result<()> { /// let p = &StandardPolicy::new(); /// - /// let (cert, _) = CertBuilder::new().generate()?; + /// let (cert, _) = CertBuilder::new().add_signing_subkey().generate()?; /// - /// // Get a usable (alive, non-revoked) certification key. + /// // Get a usable (alive, non-revoked) signing key. /// let key : &Key<_, _> = cert /// .keys().with_policy(p, None) - /// .for_certification().alive().revoked(false).nth(0).unwrap().key(); + /// .for_signing().alive().revoked(false).nth(0).unwrap().key(); /// // Derive a signer. /// let mut signer = key.clone().parts_into_secret()?.into_keypair()?; /// |