aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog9
-rw-r--r--g10/build-packet.c3
-rw-r--r--g10/export.c4
-rw-r--r--g10/import.c18
-rw-r--r--g10/packet.h1
-rw-r--r--g10/parse-packet.c21
6 files changed, 14 insertions, 42 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 6ea996178..9e478d047 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,12 @@
+2003-05-01 David Shaw <[email protected]>
+
+ * 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.
+
2003-04-30 David Shaw <[email protected]>
* pkclist.c (do_we_trust_pre): If an untrusted key was chosen by a
diff --git a/g10/build-packet.c b/g10/build-packet.c
index ebd9aeccc..052feb3a3 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -782,9 +782,6 @@ build_sig_subpkt (PKT_signature *sig, sigsubpkttype_t type,
nlen = 1; /* just a 1 byte length header */
switch( type ) {
- case SIGSUBPKT_PRIV_VERIFY_CACHE: /*(obsolete)*/
- BUG();
- break;
/* The issuer being unhashed is a historical oddity. It
should work equally as well hashed. Of course, if even an
unhashed issuer is tampered with, it makes it awfully hard
diff --git a/g10/export.c b/g10/export.c
index dc702fea6..b652c2cf7 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -280,10 +280,6 @@ do_export_stream( IOBUF out, STRLIST users, int secret,
if(i<node->pkt->pkt.signature->numrevkeys)
continue;
}
-
- /* delete our verification cache */
- delete_sig_subpkt (node->pkt->pkt.signature->unhashed,
- SIGSUBPKT_PRIV_VERIFY_CACHE);
}
/* Don't export attribs? */
diff --git a/g10/import.c b/g10/import.c
index 8e39517ad..9c1cba879 100644
--- a/g10/import.c
+++ b/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,
diff --git a/g10/packet.h b/g10/packet.h
index 492e8aa85..a10ee811a 100644
--- a/g10/packet.h
+++ b/g10/packet.h
@@ -344,7 +344,6 @@ typedef enum {
SIGSUBPKT_SIGNERS_UID =28, /* signer's user id */
SIGSUBPKT_REVOC_REASON =29, /* reason for revocation */
SIGSUBPKT_FEATURES =30, /* feature flags */
- SIGSUBPKT_PRIV_VERIFY_CACHE =101, /* cache verification result (obsolete)*/
SIGSUBPKT_FLAG_CRITICAL=128
} sigsubpkttype_t;
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index affbfacf4..48f60bc06 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -899,10 +899,12 @@ dump_sig_subpkt( int hashed, int type, int critical,
for( i=0; i < length; i++ )
printf(" %02x", buffer[i] );
break;
- case SIGSUBPKT_PRIV_VERIFY_CACHE:
- p = "obsolete verification cache";
+ default:
+ if(type>=100 && type<=110)
+ p="experimental / private subpacket";
+ else
+ p = "?";
break;
- default: p = "?"; break;
}
printf("%s)\n", p? p: "");
@@ -957,19 +959,6 @@ parse_one_sig_subpkt( const byte *buffer, size_t n, int type )
if ( n != 1 )
break;
return 0;
- case SIGSUBPKT_PRIV_VERIFY_CACHE:
- /* We used this in gpg 1.0.5 and 1.0.6 to cache signature
- * verification results - it is no longer used.
- * "GPG" 0x00 <mode> <stat>
- * where mode == 1: valid data, stat == 0: invalid signature
- * stat == 1: valid signature
- * (because we use private data, we check our marker) */
- if( n < 6 )
- break;
- if( buffer[0] != 'G' || buffer[1] != 'P'
- || buffer[2] != 'G' || buffer[3] )
- return -2;
- return 4;
default: return -1;
}
return -3;