summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2004-02-12 17:31:07 +0100
committerDavid Shaw <dshaw@jabberwocky.com>2004-02-12 17:31:07 +0100
commit8765757006bd71cd7eb9388b300181ff9eebe2a3 (patch)
tree8834c5c7782d50f861c70cfc19b1367b2ca49971 /g10
parent* options.h, g10.c (main), keylist.c (list_keyblock_print): Add (diff)
downloadgnupg2-8765757006bd71cd7eb9388b300181ff9eebe2a3.tar.xz
gnupg2-8765757006bd71cd7eb9388b300181ff9eebe2a3.zip
* import.c (import_one): Do the revocation check even in the case when a
key, a revocation key set in a direct key signature, and a revocation from that revocation key, all arrive piecemeal. Needless to say, this is pretty obscure.
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog7
-rw-r--r--g10/import.c17
2 files changed, 17 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index b7e3933f1..d66b8ac08 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,10 @@
+2004-02-12 David Shaw <dshaw@jabberwocky.com>
+
+ * import.c (import_one): Do the revocation check even in the case
+ when a key, a revocation key set in a direct key signature, and a
+ revocation from that revocation key, all arrive piecemeal.
+ Needless to say, this is pretty obscure.
+
2004-02-11 David Shaw <dshaw@jabberwocky.com>
* options.h, g10.c (main), keylist.c (list_keyblock_print): Add
diff --git a/g10/import.c b/g10/import.c
index 2168fe5f4..75f94908e 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1,6 +1,6 @@
/* import.c
- * Copyright (C) 1998, 1999, 2000, 2001, 2002,
- * 2003 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ * 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -509,7 +509,7 @@ print_import_ok (PKT_public_key *pk, PKT_secret_key *sk, unsigned int reason)
write_status_text (STATUS_IMPORT_OK, buf);
}
-void
+static void
print_import_check (PKT_public_key * pk, PKT_user_id * id)
{
char * buf;
@@ -785,11 +785,14 @@ import_one( const char *fname, KBNODE keyblock,
}
leave:
+ if(mod_key)
+ revocation_present(keyblock_orig);
+ else if(new_key)
+ revocation_present(keyblock);
+
release_kbnode( keyblock_orig );
free_public_key( pk_orig );
- revocation_present(keyblock);
-
return rc;
}
@@ -1458,8 +1461,8 @@ collapse_uids( KBNODE *keyblock )
}
/* Check for a 0x20 revocation from a revocation key that is not
- present. This gets called without the benefit of merge_xxxx so you
- can't rely on pk->revkey and friends. */
+ present. This may be called without the benefit of merge_xxxx so
+ you can't rely on pk->revkey and friends. */
static void
revocation_present(KBNODE keyblock)
{