From 4adb5c03e7128b01618c4483addcaabb7a3cb0bd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 12 Jan 2009 09:18:27 +0000 Subject: preparing a release --- g10/ChangeLog | 7 ++++++- g10/getkey.c | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'g10') diff --git a/g10/ChangeLog b/g10/ChangeLog index 1166b0fef..c76d0f561 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,8 @@ +2009-01-12 Werner Koch + + * getkey.c (finish_lookup): Take care of keys with a zero + timestamp. Reported by Peter Gutmann. + 2009-01-08 Werner Koch * misc.c (has_invalid_email_chars): Let non-ascii pass through. @@ -10420,7 +10425,7 @@ Thu Feb 12 22:24:42 1998 Werner Koch (wk@frodo) Copyright 1998,1999,2000,2001,2002,2003,2004,2005, - 2006,2007,2008 Free Software Foundation, Inc. + 2006,2007,2008,2009 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without 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; } -- cgit v1.2.3