summaryrefslogtreecommitdiffstats
path: root/guide
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-03 17:38:49 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-04 13:20:26 +0100
commit807eee2432de52715a2e3c7167d5e859ca3315a8 (patch)
treeca712d38feec4caa46c0105f1f0f9d45400c7d55 /guide
parentdaee0e230c36cec119d523ca33407789b6fd109f (diff)
openpgp: Rename KeyIter filters.
- See #359.
Diffstat (limited to 'guide')
-rw-r--r--guide/src/chapter_01.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/guide/src/chapter_01.md b/guide/src/chapter_01.md
index c4f8b7ac..932f2dc8 100644
--- a/guide/src/chapter_01.md
+++ b/guide/src/chapter_01.md
@@ -52,7 +52,7 @@ fn main() {
# -> openpgp::Result<()> {
# // Get the keypair to do the signing from the Cert.
# let key : key::UnspecifiedSecret
-# = tsk.keys_valid().signing_capable().nth(0).unwrap().2.clone().try_into()?;
+# = tsk.keys_valid().for_signing().nth(0).unwrap().2.clone().try_into()?;
# let keypair = key.into_keypair()?;
#
# // Start streaming an OpenPGP message.
@@ -198,7 +198,7 @@ fn generate() -> openpgp::Result<openpgp::Cert> {
# -> openpgp::Result<()> {
# // Get the keypair to do the signing from the Cert.
# let key : key::UnspecifiedSecret
-# = tsk.keys_valid().signing_capable().nth(0).unwrap().2.clone().try_into()?;
+# = tsk.keys_valid().for_signing().nth(0).unwrap().2.clone().try_into()?;
# let keypair = key.into_keypair()?;
#
# // Start streaming an OpenPGP message.
@@ -344,7 +344,7 @@ fn sign(sink: &mut Write, plaintext: &str, tsk: &openpgp::Cert)
-> openpgp::Result<()> {
// Get the keypair to do the signing from the Cert.
let key : key::UnspecifiedSecret
- = tsk.keys_valid().signing_capable().nth(0).unwrap().2.clone().try_into()?;
+ = tsk.keys_valid().for_signing().nth(0).unwrap().2.clone().try_into()?;
let keypair = key.into_keypair()?;
// Start streaming an OpenPGP message.
@@ -501,7 +501,7 @@ Verified data can be read from this using [`io::Read`].
# -> openpgp::Result<()> {
# // Get the keypair to do the signing from the Cert.
# let key : key::UnspecifiedSecret
-# = tsk.keys_valid().signing_capable().nth(0).unwrap().2.clone().try_into()?;
+# = tsk.keys_valid().for_signing().nth(0).unwrap().2.clone().try_into()?;
# let keypair = key.into_keypair()?;
#
# // Start streaming an OpenPGP message.