aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-01-12 09:18:27 +0000
committerWerner Koch <[email protected]>2009-01-12 09:18:27 +0000
commit4adb5c03e7128b01618c4483addcaabb7a3cb0bd (patch)
tree2c4ff40718f2af0cf77e3eea2b3fe253f682ea83 /g10/getkey.c
parentAdd limited support for NetKey 3.0 cards. (diff)
downloadgnupg-4adb5c03e7128b01618c4483addcaabb7a3cb0bd.tar.gz
gnupg-4adb5c03e7128b01618c4483addcaabb7a3cb0bd.zip
preparing a release
Diffstat (limited to 'g10/getkey.c')
-rw-r--r--g10/getkey.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 3b25b735d..d2f8ad962 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -2696,8 +2696,13 @@ finish_lookup (GETKEY_CTX ctx)
}
if (DBG_CACHE)
- log_debug( "\tsubkey looks fine\n");
- if ( pk->timestamp > latest_date ) {
+ log_debug( "\tsubkey might be fine\n");
+ /* In case a key has a timestamp of 0 set, we make sure
+ that it is used. A better change would be to compare
+ ">=" but that might also change the selected keys and
+ is as such a more intrusive change. */
+ if ( pk->timestamp > latest_date
+ || (!pk->timestamp && !latest_date)) {
latest_date = pk->timestamp;
latest_key = k;
}