mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Fix bug#1034.
Remove dead code.
This commit is contained in:
parent
4409dbf068
commit
b6798b5d8d
3 changed files with 41 additions and 34 deletions
|
@ -426,42 +426,52 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
|
|||
}
|
||||
|
||||
in_cert = 1;
|
||||
if (pkt->pkttype == PKT_RING_TRUST) {
|
||||
if (pkt->pkttype == PKT_RING_TRUST)
|
||||
{
|
||||
/*(this code is duplicated after the loop)*/
|
||||
if ( lastnode
|
||||
&& lastnode->pkt->pkttype == PKT_SIGNATURE
|
||||
&& (pkt->pkt.ring_trust->sigcache & 1) ) {
|
||||
/* this is a ring trust packet with a checked signature
|
||||
/* This is a ring trust packet with a checked signature
|
||||
* status cache following directly a signature paket.
|
||||
* Set the cache status into that signature packet */
|
||||
* Set the cache status into that signature packet. */
|
||||
PKT_signature *sig = lastnode->pkt->pkt.signature;
|
||||
|
||||
sig->flags.checked = 1;
|
||||
sig->flags.valid = !!(pkt->pkt.ring_trust->sigcache & 2);
|
||||
}
|
||||
/* reset lastnode, so that we set the cache status only from
|
||||
* the ring trust packet immediately folling a signature */
|
||||
/* Reset LASTNODE, so that we set the cache status only from
|
||||
* the ring trust packet immediately following a signature. */
|
||||
lastnode = NULL;
|
||||
}
|
||||
else {
|
||||
node = lastnode = new_kbnode (pkt);
|
||||
if (!keyblock)
|
||||
keyblock = node;
|
||||
else
|
||||
add_kbnode (keyblock, node);
|
||||
free_packet(pkt);
|
||||
init_packet(pkt);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( pkt->pkttype == PKT_PUBLIC_KEY
|
||||
|| pkt->pkttype == PKT_PUBLIC_SUBKEY
|
||||
|| pkt->pkttype == PKT_SECRET_KEY
|
||||
|| pkt->pkttype == PKT_SECRET_SUBKEY) {
|
||||
if (++pk_no == hd->found.pk_no)
|
||||
node->flag |= 1;
|
||||
}
|
||||
else if ( pkt->pkttype == PKT_USER_ID) {
|
||||
if (++uid_no == hd->found.uid_no)
|
||||
node->flag |= 2;
|
||||
}
|
||||
}
|
||||
|
||||
node = lastnode = new_kbnode (pkt);
|
||||
if (!keyblock)
|
||||
keyblock = node;
|
||||
else
|
||||
add_kbnode (keyblock, node);
|
||||
switch (pkt->pkttype)
|
||||
{
|
||||
case PKT_PUBLIC_KEY:
|
||||
case PKT_PUBLIC_SUBKEY:
|
||||
case PKT_SECRET_KEY:
|
||||
case PKT_SECRET_SUBKEY:
|
||||
if (++pk_no == hd->found.pk_no)
|
||||
node->flag |= 1;
|
||||
break;
|
||||
|
||||
case PKT_USER_ID:
|
||||
if (++uid_no == hd->found.uid_no)
|
||||
node->flag |= 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
pkt = xmalloc (sizeof *pkt);
|
||||
init_packet(pkt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue