mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Remove options --pgp2 and --rfc1991.
* g10/gpg.c (oRFC1991, oPGP2): Remove (opts): Remove --pgp2 and --rfc1991. * g10/options.h (CO_PGP2, CO_RFC1991): Remove. Remove all users. (RFC2440, PGP2): Remove. Remove all code only enabled by these conditions. * tests/openpgp/clearsig.test: Remove --rfc1991 test. -- The use of PGP 2.c is considered insecure for quite some time now (e.g. due to the use of MD5). Thus we remove all support for _creating_ PGP 2 compatible messages.
This commit is contained in:
parent
49c9a958e0
commit
2b8d8369d5
14 changed files with 51 additions and 249 deletions
|
@ -518,19 +518,6 @@ sign_uids (estream_t fp,
|
|||
KBNODE node, uidnode;
|
||||
PKT_public_key *primary_pk = NULL;
|
||||
int select_all = !count_selected_uids (keyblock) || interactive;
|
||||
int all_v3 = 1;
|
||||
|
||||
/* Are there any non-v3 sigs on this key already? */
|
||||
if (PGP2)
|
||||
{
|
||||
for (node = keyblock; node; node = node->next)
|
||||
if (node->pkt->pkttype == PKT_SIGNATURE &&
|
||||
node->pkt->pkt.signature->version > 3)
|
||||
{
|
||||
all_v3 = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Build a list of all signators.
|
||||
*
|
||||
|
@ -894,29 +881,6 @@ sign_uids (estream_t fp,
|
|||
if (duration)
|
||||
force_v4 = 1;
|
||||
|
||||
/* Is --pgp2 on, it's a v3 key, all the sigs on the key are
|
||||
currently v3 and we're about to sign it with a v4 sig? If
|
||||
so, danger! */
|
||||
if (PGP2 && all_v3 &&
|
||||
(pk->version > 3 || force_v4) && primary_pk->version <= 3)
|
||||
{
|
||||
tty_fprintf (fp, _("You may not make an OpenPGP signature on a "
|
||||
"PGP 2.x key while in --pgp2 mode.\n"));
|
||||
tty_fprintf (fp, _("This would make the key unusable in PGP 2.x.\n"));
|
||||
|
||||
if (opt.expert && !quick)
|
||||
{
|
||||
if (!cpr_get_answer_is_yes ("sign_uid.v4_on_v3_okay",
|
||||
_("Are you sure you still "
|
||||
"want to sign it? (y/N) ")))
|
||||
continue;
|
||||
|
||||
all_v3 = 0;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (selfsig)
|
||||
;
|
||||
else
|
||||
|
@ -1773,7 +1737,7 @@ keyedit_menu (ctrl_t ctrl, const char *username, strlist_t locusr,
|
|||
break;
|
||||
|
||||
case cmdADDPHOTO:
|
||||
if (RFC2440 || RFC1991 || PGP2)
|
||||
if (RFC2440)
|
||||
{
|
||||
tty_printf (_("This command is not allowed while in %s mode.\n"),
|
||||
compliance_option_string ());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue