diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-03 17:38:49 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-04 13:20:26 +0100 |
commit | 807eee2432de52715a2e3c7167d5e859ca3315a8 (patch) | |
tree | ca712d38feec4caa46c0105f1f0f9d45400c7d55 /openpgp/examples | |
parent | daee0e230c36cec119d523ca33407789b6fd109f (diff) |
openpgp: Rename KeyIter filters.
- See #359.
Diffstat (limited to 'openpgp/examples')
-rw-r--r-- | openpgp/examples/generate-sign-verify.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/notarize.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/sign-detached.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/sign.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/examples/generate-sign-verify.rs b/openpgp/examples/generate-sign-verify.rs index a712e693..6e3d8084 100644 --- a/openpgp/examples/generate-sign-verify.rs +++ b/openpgp/examples/generate-sign-verify.rs @@ -40,7 +40,7 @@ fn generate() -> openpgp::Result<openpgp::Cert> { fn sign(sink: &mut dyn Write, plaintext: &str, tsk: &openpgp::Cert) -> openpgp::Result<()> { // Get the keypair to do the signing from the Cert. - let keypair = tsk.keys_valid().signing_capable().nth(0).unwrap().2 + let keypair = tsk.keys_valid().for_signing().nth(0).unwrap().2 .clone().mark_parts_secret().unwrap().into_keypair()?; // Start streaming an OpenPGP message. diff --git a/openpgp/examples/notarize.rs b/openpgp/examples/notarize.rs index c4694520..ce007968 100644 --- a/openpgp/examples/notarize.rs +++ b/openpgp/examples/notarize.rs @@ -28,7 +28,7 @@ fn main() { .expect("Failed to read key"); let mut n = 0; - for (_, _, key) in tsk.keys_valid().signing_capable().secret() { + for (_, _, key) in tsk.keys_valid().for_signing().secret() { keys.push({ let mut key = key.clone(); if key.secret().expect("filtered").is_encrypted() { diff --git a/openpgp/examples/sign-detached.rs b/openpgp/examples/sign-detached.rs index 9990f770..0fee0e36 100644 --- a/openpgp/examples/sign-detached.rs +++ b/openpgp/examples/sign-detached.rs @@ -24,7 +24,7 @@ fn main() { .expect("Failed to read key"); let mut n = 0; - for (_, _, key) in tsk.keys_valid().signing_capable().secret() { + for (_, _, key) in tsk.keys_valid().for_signing().secret() { keys.push({ let mut key = key.clone(); if key.secret().expect("filtered").is_encrypted() { diff --git a/openpgp/examples/sign.rs b/openpgp/examples/sign.rs index 296f6950..195ac508 100644 --- a/openpgp/examples/sign.rs +++ b/openpgp/examples/sign.rs @@ -23,7 +23,7 @@ fn main() { .expect("Failed to read key"); let mut n = 0; - for (_, _, key) in tsk.keys_valid().signing_capable().secret() { + for (_, _, key) in tsk.keys_valid().for_signing().secret() { keys.push({ let mut key = key.clone(); if key.secret().expect("filtered").is_encrypted() { |