aboutsummaryrefslogtreecommitdiffstats
path: root/g10/pubkey-enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/pubkey-enc.c')
-rw-r--r--g10/pubkey-enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c
index b1a9c8ec4..97c73bbc7 100644
--- a/g10/pubkey-enc.c
+++ b/g10/pubkey-enc.c
@@ -54,7 +54,7 @@ get_session_key( PKT_pubkey_enc *k, DEK *dek )
if( rc )
goto leave;
- if( k->keyid[0] || k->keyid[1] ) {
+ if( (k->keyid[0] || k->keyid[1]) && !opt.try_all_secrets ) {
sk = m_alloc_clear( sizeof *sk );
sk->pubkey_algo = k->pubkey_algo; /* we want a pubkey with this algo*/
if( !(rc = get_seckey( sk, k->keyid )) )