summaryrefslogtreecommitdiffstats
path: root/guide/src/chapter_01.md
diff options
context:
space:
mode:
Diffstat (limited to 'guide/src/chapter_01.md')
-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 6368a9eb..56c131fb 100644
--- a/guide/src/chapter_01.md
+++ b/guide/src/chapter_01.md
@@ -51,7 +51,7 @@ fn main() {
# fn sign(sink: &mut Write, plaintext: &str, tsk: &openpgp::Cert)
# -> openpgp::Result<()> {
# // Get the keypair to do the signing from the Cert.
-# let keypair = tsk.keys_valid().for_signing().nth(0).unwrap().
+# let keypair = tsk.keys().alive().revoked(false).for_signing().nth(0).unwrap().
# key().clone().mark_parts_secret().unwrap().into_keypair()?;
#
# // Start streaming an OpenPGP message.
@@ -196,7 +196,7 @@ fn generate() -> openpgp::Result<openpgp::Cert> {
# fn sign(sink: &mut Write, plaintext: &str, tsk: &openpgp::Cert)
# -> openpgp::Result<()> {
# // Get the keypair to do the signing from the Cert.
-# let keypair = tsk.keys_valid().for_signing().nth(0).unwrap().
+# let keypair = tsk.keys().alive().revoked(false).for_signing().nth(0).unwrap().
# key().clone().mark_parts_secret().unwrap().into_keypair()?;
#
# // Start streaming an OpenPGP message.
@@ -341,7 +341,7 @@ implements [`io::Write`], and we simply write the plaintext to it.
fn sign(sink: &mut Write, plaintext: &str, tsk: &openpgp::Cert)
-> openpgp::Result<()> {
// Get the keypair to do the signing from the Cert.
- let keypair = tsk.keys_valid().for_signing().nth(0).unwrap().
+ let keypair = tsk.keys().alive().revoked(false).for_signing().nth(0).unwrap().
key().clone().mark_parts_secret().unwrap().into_keypair()?;
// Start streaming an OpenPGP message.
@@ -497,7 +497,7 @@ Verified data can be read from this using [`io::Read`].
# fn sign(sink: &mut Write, plaintext: &str, tsk: &openpgp::Cert)
# -> openpgp::Result<()> {
# // Get the keypair to do the signing from the Cert.
-# let keypair = tsk.keys_valid().for_signing().nth(0).unwrap().
+# let keypair = tsk.keys().alive().revoked(false).for_signing().nth(0).unwrap().
# key().clone().mark_parts_secret().unwrap().into_keypair()?;
#
# // Start streaming an OpenPGP message.