mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* packet.h, build-packet.c (build_sig_subpkt), export.c
(do_export_stream), import.c (remove_bad_stuff, import), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt): Remove vestigal code for the old sig cache subpacket. This wasn't completely harmless as it caused subpacket 101 to disappear on import and export.
This commit is contained in:
parent
55ddaeb1b5
commit
620afaecb5
6 changed files with 14 additions and 42 deletions
18
g10/import.c
18
g10/import.c
|
@ -60,7 +60,6 @@ static int import( IOBUF inp, int fast, const char* fname,
|
|||
struct stats_s *stats, unsigned int options );
|
||||
static int read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root );
|
||||
static void revocation_present(KBNODE keyblock);
|
||||
static void remove_bad_stuff (KBNODE keyblock);
|
||||
static int import_one( const char *fname, KBNODE keyblock, int fast,
|
||||
struct stats_s *stats, unsigned int options);
|
||||
static int import_secret_one( const char *fname, KBNODE keyblock,
|
||||
|
@ -247,7 +246,6 @@ import( IOBUF inp, int fast, const char* fname,
|
|||
}
|
||||
|
||||
while( !(rc = read_block( inp, &pending_pkt, &keyblock) )) {
|
||||
remove_bad_stuff (keyblock);
|
||||
if( keyblock->pkt->pkttype == PKT_PUBLIC_KEY )
|
||||
rc = import_one( fname, keyblock, fast, stats, options );
|
||||
else if( keyblock->pkt->pkttype == PKT_SECRET_KEY )
|
||||
|
@ -437,22 +435,6 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
|
|||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
remove_bad_stuff (KBNODE keyblock)
|
||||
{
|
||||
KBNODE node;
|
||||
|
||||
for (node=keyblock; node; node = node->next ) {
|
||||
if( node->pkt->pkttype == PKT_SIGNATURE ) {
|
||||
/* delete the subpackets we used to use for the
|
||||
verification cache */
|
||||
delete_sig_subpkt (node->pkt->pkt.signature->unhashed,
|
||||
SIGSUBPKT_PRIV_VERIFY_CACHE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Walk through the subkeys on a pk to find if we have the PKS
|
||||
disease: multiple subkeys with their binding sigs stripped, and the
|
||||
sig for the first subkey placed after the last subkey. That is,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue