aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-05-03 04:07:45 +0000
committerDavid Shaw <[email protected]>2003-05-03 04:07:45 +0000
commit3afe991bb88fe31c8f24d5c5ddd7621a6bbe258e (patch)
tree149bbd7006bf90c57de089f6aea8b200f9bcd866 /g10/import.c
parent* cipher.h: Add constants for compression algorithms. (diff)
downloadgnupg-3afe991bb88fe31c8f24d5c5ddd7621a6bbe258e.tar.gz
gnupg-3afe991bb88fe31c8f24d5c5ddd7621a6bbe258e.zip
* 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. * options.h, armor.c, cipher.c, g10.c, keyedit.c, pkclist.c, sign.c, encode.c, getkey.c, revoke.c: The current flags for different levels of PGP-ness are massively complex. This is step one in simplifying them. No functional change yet, just use a macro to check for compliance level. * sign.c (sign_file): Fix bug that causes spurious compression preference warning. * sign.c (clearsign_file): Fix bug that prevents proper warning message from appearing when clearsigning in --pgp2 mode with a non-v3 RSA key. * main.h, misc.c (compliance_option_string, compliance_string, compliance_failure), pkclist.c (build_pk_list), sign.c (sign_file, clearsign_file), encode.c (encode_crypt, write_pubkey_enc_from_list): New functions to put the "this message may not be usable...." warning in one place. * options.h, g10.c (main): Part two of the simplification. Use a single enum to indicate what we are compliant to (1991, 2440, PGPx, etc.) * g10.c (main): Show errors for failure in export, send-keys, recv-keys, and refresh-keys. * options.h, g10.c (main): Give algorithm warnings for algorithms chosen against the --pgpX and --openpgp rules. * keydb.h, pkclist.c (algo_available): Make TIGER192 invalid in --openpgp mode. * sign.c (sign_file), pkclist.c (algo_available): Allow passing a hint of 0.
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/g10/import.c b/g10/import.c
index 4fb6f5690..cec24b8ad 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -60,7 +60,6 @@ static int import( IOBUF inp, 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,
struct stats_s *stats, unsigned int options);
static int import_secret_one( const char *fname, KBNODE keyblock,
@@ -260,7 +259,6 @@ import( IOBUF inp, 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, stats, options );
else if( keyblock->pkt->pkttype == PKT_SECRET_KEY )
@@ -450,22 +448,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,