aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/getkey.c')
-rw-r--r--g10/getkey.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 21ffd5cfa..d54edcd7f 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3772,6 +3772,13 @@ finish_lookup (kbnode_t keyblock, unsigned int req_usage, int want_exact,
continue;
}
+ if (secret_key_avail < last_secret_key_avail)
+ {
+ if (DBG_LOOKUP)
+ log_debug ("\tskipping secret key with lower avail\n");
+ continue;
+ }
+
if (secret_key_avail > last_secret_key_avail)
{
/* Use this key. */