1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* options.h, g10.c (main), encode.c (write_pubkey_enc_from_list),

pkclist.c (algo_available), revoke.c (gen_revoke): Add --pgp8 mode.  This
is basically identical to --pgp7 in all ways except that signing subkeys,
v4 data sigs (including expiration), and SK comments are allowed.

* getkey.c (finish_lookup): Comment.
This commit is contained in:
David Shaw 2002-12-03 23:09:20 +00:00
parent 33783a41a4
commit dc70beb88f
7 changed files with 63 additions and 35 deletions

View file

@ -172,6 +172,8 @@ enum cmd_and_opt_values { aNull = 0,
oNoPGP6,
oPGP7,
oNoPGP7,
oPGP8,
oNoPGP8,
oCipherAlgo,
oDigestAlgo,
oCertDigestAlgo,
@ -449,6 +451,8 @@ static ARGPARSE_OPTS opts[] = {
{ oNoPGP6, "no-pgp6", 0, "@"},
{ oPGP7, "pgp7", 0, "@"},
{ oNoPGP7, "no-pgp7", 0, "@"},
{ oPGP8, "pgp8", 0, "@"},
{ oNoPGP8, "no-pgp8", 0, "@"},
{ oS2KMode, "s2k-mode", 1, N_("|N|use passphrase mode N")},
{ oS2KDigest, "s2k-digest-algo",2,
N_("|NAME|use message digest algorithm NAME for passphrases")},
@ -1457,6 +1461,8 @@ main( int argc, char **argv )
case oNoPGP6: opt.pgp6 = 0; break;
case oPGP7: opt.pgp7 = 1; break;
case oNoPGP7: opt.pgp7 = 0; break;
case oPGP8: opt.pgp8 = 1; break;
case oNoPGP8: opt.pgp8 = 0; break;
case oEmuMDEncodeBug: opt.emulate_bugs |= EMUBUG_MDENCODE; break;
case oCompressSigs: opt.compress_sigs = 1; break;
case oRunAsShmCP:
@ -1743,9 +1749,9 @@ main( int argc, char **argv )
set_debug();
/* Do these after the switch(), so they can override settings. */
if(opt.pgp2 && (opt.pgp6 || opt.pgp7))
if(opt.pgp2 && (opt.pgp6 || opt.pgp7 || opt.pgp8))
log_error(_("%s not allowed with %s!\n"),
"--pgp2",opt.pgp6?"--pgp6":"--pgp7");
"--pgp2",opt.pgp6?"--pgp6":opt.pgp7?"--pgp7":"--pgp8");
else
{
if(opt.pgp2)
@ -1826,20 +1832,28 @@ main( int argc, char **argv )
opt.def_compress_algo = 1;
}
}
if(opt.pgp6 || opt.pgp7)
else if(opt.pgp6)
{
opt.sk_comments=0;
opt.escape_from=1;
opt.force_v3_sigs=1;
opt.ask_sig_expire=0;
opt.def_compress_algo=1;
if(opt.pgp6) /* pgp7 has MDC */
{
opt.force_mdc=0;
opt.disable_mdc=1;
}
opt.force_mdc=0;
opt.disable_mdc=1;
}
else if(opt.pgp7)
{
opt.sk_comments=0;
opt.escape_from=1;
opt.force_v3_sigs=1;
opt.ask_sig_expire=0;
opt.def_compress_algo=1;
}
else if(opt.pgp8)
{
opt.escape_from=1;
opt.def_compress_algo=1;
}
}