From 1fed5c87f0e792599b6d71fad908f60b27b6446b Mon Sep 17 00:00:00 2001 From: David Shaw Date: Fri, 4 Oct 2002 22:12:09 +0000 Subject: * 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. --- g10/getkey.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'g10/getkey.c') diff --git a/g10/getkey.c b/g10/getkey.c index a123f5fdd..991b98d2f 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -417,7 +417,10 @@ get_pubkey_direct (PKT_public_key *pk, u32 *keyid) || keyblock->pkt->pkttype == PKT_PUBLIC_SUBKEY ); copy_public_key (pk, keyblock->pkt->pkt.public_key ); release_kbnode (keyblock); - cache_public_key (pk); + + /* Not caching key here since it won't have all of the fields + properly set. */ + return 0; } -- cgit v1.2.3