summaryrefslogtreecommitdiffstats
path: root/g10/sig-check.c
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2002-10-05 00:12:09 +0200
committerDavid Shaw <dshaw@jabberwocky.com>2002-10-05 00:12:09 +0200
commit1fed5c87f0e792599b6d71fad908f60b27b6446b (patch)
tree30bc39c743f89d4c93ae67cdc01ff5ffc71fd6e0 /g10/sig-check.c
parent* import.c (import_keys_internal): s/inp/inp2/ to avoid shadowing (diff)
downloadgnupg2-1fed5c87f0e792599b6d71fad908f60b27b6446b.tar.xz
gnupg2-1fed5c87f0e792599b6d71fad908f60b27b6446b.zip
* getkey.c (get_pubkey_direct): Don't cache keys retrieved via this
function as they may not have all their fields filled in. * sig-check.c (signature_check2): Use new is_primary flag to check rather than comparing main_keyid with keyid as this still works in the case of a not fully filled in pk.
Diffstat (limited to 'g10/sig-check.c')
-rw-r--r--g10/sig-check.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/g10/sig-check.c b/g10/sig-check.c
index 2b3c6472c..c068e4409 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -75,9 +75,7 @@ signature_check2( PKT_signature *sig, MD_HANDLE digest,
}
else if( get_pubkey( pk, sig->keyid ) )
rc = G10ERR_NO_PUBKEY;
- else if(!pk->is_valid &&
- (pk->main_keyid[0]!=pk->keyid[0] ||
- pk->main_keyid[1]!=pk->keyid[1]))
+ else if(!pk->is_valid && !pk->is_primary)
rc=G10ERR_BAD_PUBKEY; /* you cannot have a good sig from an
invalid subkey */
else {