diff --git a/common/compliance.c b/common/compliance.c index 49aada144..b7d4d4970 100644 --- a/common/compliance.c +++ b/common/compliance.c @@ -528,7 +528,6 @@ gnupg_status_compliance_flag (enum gnupg_compliance_mode compliance) return "8"; case CO_RFC4880: case CO_RFC2440: - case CO_PGP6: case CO_PGP7: case CO_PGP8: log_assert (!"no status code assigned for this compliance mode"); @@ -580,7 +579,6 @@ gnupg_compliance_option_string (enum gnupg_compliance_mode compliance) case CO_GNUPG: return "--compliance=gnupg"; case CO_RFC4880: return "--compliance=openpgp"; case CO_RFC2440: return "--compliance=rfc2440"; - case CO_PGP6: return "--compliance=pgp6"; case CO_PGP7: return "--compliance=pgp7"; case CO_PGP8: return "--compliance=pgp8"; case CO_DE_VS: return "--compliance=de-vs"; diff --git a/common/compliance.h b/common/compliance.h index 2076e79cb..d36c7c131 100644 --- a/common/compliance.h +++ b/common/compliance.h @@ -39,7 +39,7 @@ void gnupg_initialize_compliance (int gnupg_module_name); enum gnupg_compliance_mode { CO_GNUPG, CO_RFC4880, CO_RFC2440, - CO_PGP6, CO_PGP7, CO_PGP8, CO_DE_VS + CO_PGP7, CO_PGP8, CO_DE_VS }; enum pk_use_case diff --git a/doc/gpg.texi b/doc/gpg.texi index baad58657..9754c1703 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2744,22 +2744,15 @@ and should thus only be used for experiments. See also option @item --pgp6 @opindex pgp6 -Set up all options to be as PGP 6 compliant as possible. This -restricts you to the ciphers IDEA (if the IDEA plugin is installed), -3DES, and CAST5, the hashes MD5, SHA1 and RIPEMD160, and the -compression algorithms none and ZIP. This also disables -@option{--throw-keyids}, and making signatures with signing subkeys as PGP 6 -does not understand signatures made by signing subkeys. -FIXME: remove this options. - -This option implies @option{--escape-from-lines}. +This option is obsolete; it is handled as an alias for @option{--pgp7} @item --pgp7 @opindex pgp7 -Set up all options to be as PGP 7 compliant as possible. This is -identical to @option{--pgp6} except that MDCs are not disabled, and the -list of allowable ciphers is expanded to add AES128, AES192, AES256, and -TWOFISH. +Set up all options to be as PGP 7 compliant as possible. This allowd +the ciphers IDEA, 3DES, CAST5,AES128, AES192, AES256, and TWOFISH., +the hashes MD5, SHA1 and RIPEMD160, and the compression algorithms +none and ZIP. This option implies @option{--escape-from-lines} and +disables @option{--throw-keyids}, @item --pgp8 @opindex pgp8 diff --git a/g10/encrypt.c b/g10/encrypt.c index 7de07d234..04a9ab214 100644 --- a/g10/encrypt.c +++ b/g10/encrypt.c @@ -1136,7 +1136,7 @@ write_pubkey_enc (ctrl_t ctrl, static int write_pubkey_enc_from_list (ctrl_t ctrl, PK_LIST pk_list, DEK *dek, iobuf_t out) { - if (opt.throw_keyids && (PGP6 || PGP7 || PGP8)) + if (opt.throw_keyids && (PGP7 || PGP8)) { log_info(_("option '%s' may not be used in %s mode\n"), "--throw-keyids", diff --git a/g10/getkey.c b/g10/getkey.c index fe6483592..b111376c9 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -3474,7 +3474,7 @@ merge_selfsigs (ctrl_t ctrl, kbnode_t keyblock) * * In case the primary key is not required, select a suitable subkey. * We need the primary key if PUBKEY_USAGE_CERT is set in REQ_USAGE or - * we are in PGP6 or PGP7 mode and PUBKEY_USAGE_SIG is set in + * we are in PGP7 mode and PUBKEY_USAGE_SIG is set in * REQ_USAGE. * * If any of PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC and PUBKEY_USAGE_CERT @@ -3536,10 +3536,10 @@ finish_lookup (kbnode_t keyblock, unsigned int req_usage, int want_exact, req_usage &= USAGE_MASK; /* Request the primary if we're certifying another key, and also if - * signing data while --pgp6 or --pgp7 is on since pgp 6 and 7 do + * signing data while --pgp7 is on since pgp 7 do * not understand signatures made by a signing subkey. PGP 8 does. */ req_prim = ((req_usage & PUBKEY_USAGE_CERT) - || ((PGP6 || PGP7) && (req_usage & PUBKEY_USAGE_SIG))); + || (PGP7 && (req_usage & PUBKEY_USAGE_SIG))); log_assert (keyblock->pkt->pkttype == PKT_PUBLIC_KEY); diff --git a/g10/gpg.c b/g10/gpg.c index 1a419f7e7..af56f1256 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -240,7 +240,6 @@ enum cmd_and_opt_values oRFC4880, oRFC4880bis, oOpenPGP, - oPGP6, oPGP7, oPGP8, oDE_VS, @@ -658,7 +657,7 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_n (oRFC4880, "rfc4880", "@"), ARGPARSE_s_n (oRFC4880bis, "rfc4880bis", "@"), ARGPARSE_s_n (oOpenPGP, "openpgp", N_("use strict OpenPGP behavior")), - ARGPARSE_s_n (oPGP6, "pgp6", "@"), + ARGPARSE_s_n (oPGP7, "pgp6", "@"), ARGPARSE_s_n (oPGP7, "pgp7", "@"), ARGPARSE_s_n (oPGP8, "pgp8", "@"), @@ -2132,7 +2131,7 @@ static struct gnupg_compliance_option compliance_options[] = { "rfc4880bis", oRFC4880bis }, { "rfc4880", oRFC4880 }, { "rfc2440", oRFC2440 }, - { "pgp6", oPGP6 }, + { "pgp6", oPGP7 }, { "pgp7", oPGP7 }, { "pgp8", oPGP8 }, { "de-vs", oDE_VS } @@ -2189,7 +2188,6 @@ set_compliance_option (enum cmd_and_opt_values option) opt.s2k_digest_algo = DIGEST_ALGO_SHA1; opt.s2k_cipher_algo = CIPHER_ALGO_3DES; break; - case oPGP6: opt.compliance = CO_PGP6; break; case oPGP7: opt.compliance = CO_PGP7; break; case oPGP8: opt.compliance = CO_PGP8; break; case oGnuPG: opt.compliance = CO_GNUPG; break; @@ -2935,7 +2933,6 @@ main (int argc, char **argv) case oRFC2440: case oRFC4880: case oRFC4880bis: - case oPGP6: case oPGP7: case oPGP8: case oGnuPG: @@ -3788,14 +3785,7 @@ main (int argc, char **argv) log_clock ("start"); /* Do these after the switch(), so they can override settings. */ - if(PGP6) - { - /* That does not anymore work because we have no more support - for v3 signatures. */ - opt.escape_from=1; - opt.ask_sig_expire=0; - } - else if(PGP7) + if (PGP7) { /* That does not anymore work because we have no more support for v3 signatures. */ @@ -4274,7 +4264,7 @@ main (int argc, char **argv) else if(opt.s2k_mode==0) log_error(_("you cannot use --symmetric --encrypt" " with --s2k-mode 0\n")); - else if(PGP6 || PGP7) + else if (PGP7) log_error(_("you cannot use --symmetric --encrypt" " in %s mode\n"), gnupg_compliance_option_string (opt.compliance)); @@ -4335,7 +4325,7 @@ main (int argc, char **argv) else if(opt.s2k_mode==0) log_error(_("you cannot use --symmetric --sign --encrypt" " with --s2k-mode 0\n")); - else if(PGP6 || PGP7) + else if (PGP7) log_error(_("you cannot use --symmetric --sign --encrypt" " in %s mode\n"), gnupg_compliance_option_string (opt.compliance)); diff --git a/g10/misc.c b/g10/misc.c index 1e6df5f67..d7a3ee3f2 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -1387,10 +1387,6 @@ compliance_failure(void) ver="OpenPGP (older)"; break; - case CO_PGP6: - ver="PGP 6.x"; - break; - case CO_PGP7: ver="PGP 7.x"; break; diff --git a/g10/options.h b/g10/options.h index 09d4e4435..3754687ae 100644 --- a/g10/options.h +++ b/g10/options.h @@ -340,10 +340,9 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode; #define GNUPG (opt.compliance==CO_GNUPG || opt.compliance==CO_DE_VS) #define RFC2440 (opt.compliance==CO_RFC2440) #define RFC4880 (opt.compliance==CO_RFC4880) -#define PGP6 (opt.compliance==CO_PGP6) #define PGP7 (opt.compliance==CO_PGP7) #define PGP8 (opt.compliance==CO_PGP8) -#define PGPX (PGP6 || PGP7 || PGP8) +#define PGPX (PGP7 || PGP8) /* Various option flags. Note that there should be no common string names between the IMPORT_ and EXPORT_ flags as they can be mixed in diff --git a/g10/pkclist.c b/g10/pkclist.c index 05bbea52d..6aec13882 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -1022,7 +1022,7 @@ build_pk_list (ctrl_t ctrl, strlist_t rcpts, PK_LIST *ret_pk_list) /* Hidden recipients are not allowed while in PGP mode, issue a warning and switch into GnuPG mode. */ - if ((rov->flags & PK_LIST_HIDDEN) && (PGP6 || PGP7 || PGP8)) + if ((rov->flags & PK_LIST_HIDDEN) && (PGP7 || PGP8)) { log_info(_("option '%s' may not be used in %s mode\n"), "--hidden-recipient", @@ -1073,7 +1073,7 @@ build_pk_list (ctrl_t ctrl, strlist_t rcpts, PK_LIST *ret_pk_list) /* Hidden encrypt-to recipients are not allowed while in PGP mode, issue a warning and switch into GnuPG mode. */ - if ((r->flags&PK_LIST_ENCRYPT_TO) && (PGP6 || PGP7 || PGP8)) + if ((r->flags&PK_LIST_ENCRYPT_TO) && (PGP7 || PGP8)) { log_info(_("option '%s' may not be used in %s mode\n"), "--hidden-encrypt-to", @@ -1370,11 +1370,6 @@ algo_available( preftype_t preftype, int algo, const union pref_hint *hint) { if( preftype == PREFTYPE_SYM ) { - if(PGP6 && (algo != CIPHER_ALGO_IDEA - && algo != CIPHER_ALGO_3DES - && algo != CIPHER_ALGO_CAST5)) - return 0; - if(PGP7 && (algo != CIPHER_ALGO_IDEA && algo != CIPHER_ALGO_3DES && algo != CIPHER_ALGO_CAST5 @@ -1405,9 +1400,9 @@ algo_available( preftype_t preftype, int algo, const union pref_hint *hint) return 0; } - if((PGP6 || PGP7) && (algo != DIGEST_ALGO_MD5 - && algo != DIGEST_ALGO_SHA1 - && algo != DIGEST_ALGO_RMD160)) + if (PGP7 && (algo != DIGEST_ALGO_MD5 + && algo != DIGEST_ALGO_SHA1 + && algo != DIGEST_ALGO_RMD160)) return 0; @@ -1421,8 +1416,8 @@ algo_available( preftype_t preftype, int algo, const union pref_hint *hint) } else if( preftype == PREFTYPE_ZIP ) { - if((PGP6 || PGP7) && (algo != COMPRESS_ALGO_NONE - && algo != COMPRESS_ALGO_ZIP)) + if (PGP7 && (algo != COMPRESS_ALGO_NONE + && algo != COMPRESS_ALGO_ZIP)) return 0; /* PGP8 supports all the compression algos we do */ diff --git a/g10/revoke.c b/g10/revoke.c index 3a089725c..b778684b0 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -480,7 +480,7 @@ create_revocation (ctrl_t ctrl, goto leave; } - if (keyblock && (PGP6 || PGP7 || PGP8)) + if (keyblock && (PGP7 || PGP8)) { /* Use a minimal pk for PGPx mode, since PGP can't import bare revocation certificates. */