mirror of
git://git.gnupg.org/gnupg.git
synced 2024-10-31 20:08:43 +01:00
* 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.
This commit is contained in:
parent
d68fe4f73d
commit
1fed5c87f0
@ -1,3 +1,12 @@
|
|||||||
|
2002-10-04 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2002-10-04 Werner Koch <wk@gnupg.org>
|
2002-10-04 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* import.c (import_keys_internal): s/inp/inp2/ to avoid shadowing
|
* import.c (import_keys_internal): s/inp/inp2/ to avoid shadowing
|
||||||
|
@ -417,7 +417,10 @@ get_pubkey_direct (PKT_public_key *pk, u32 *keyid)
|
|||||||
|| keyblock->pkt->pkttype == PKT_PUBLIC_SUBKEY );
|
|| keyblock->pkt->pkttype == PKT_PUBLIC_SUBKEY );
|
||||||
copy_public_key (pk, keyblock->pkt->pkt.public_key );
|
copy_public_key (pk, keyblock->pkt->pkt.public_key );
|
||||||
release_kbnode (keyblock);
|
release_kbnode (keyblock);
|
||||||
cache_public_key (pk);
|
|
||||||
|
/* Not caching key here since it won't have all of the fields
|
||||||
|
properly set. */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,9 +75,7 @@ signature_check2( PKT_signature *sig, MD_HANDLE digest,
|
|||||||
}
|
}
|
||||||
else if( get_pubkey( pk, sig->keyid ) )
|
else if( get_pubkey( pk, sig->keyid ) )
|
||||||
rc = G10ERR_NO_PUBKEY;
|
rc = G10ERR_NO_PUBKEY;
|
||||||
else if(!pk->is_valid &&
|
else if(!pk->is_valid && !pk->is_primary)
|
||||||
(pk->main_keyid[0]!=pk->keyid[0] ||
|
|
||||||
pk->main_keyid[1]!=pk->keyid[1]))
|
|
||||||
rc=G10ERR_BAD_PUBKEY; /* you cannot have a good sig from an
|
rc=G10ERR_BAD_PUBKEY; /* you cannot have a good sig from an
|
||||||
invalid subkey */
|
invalid subkey */
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user