mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-04 22:57:47 +02:00
* main.h, g10.c (main), import.c (parse_import_options,
fix_pks_corruption): It's really PKS corruption, not HKP corruption. Keep the old repair-hkp-subkey-bug command as an alias. * g10.c (main): Rename --no-version to --no-emit-version for consistency. Keep --no-version as an alias.
This commit is contained in:
parent
11fc63ba93
commit
3cf45b304e
|
@ -1,3 +1,13 @@
|
||||||
|
2003-04-08 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* main.h, g10.c (main), import.c (parse_import_options,
|
||||||
|
fix_pks_corruption): It's really PKS corruption, not HKP
|
||||||
|
corruption. Keep the old repair-hkp-subkey-bug command as an
|
||||||
|
alias.
|
||||||
|
|
||||||
|
* g10.c (main): Rename --no-version to --no-emit-version for
|
||||||
|
consistency. Keep --no-version as an alias.
|
||||||
|
|
||||||
2003-04-04 David Shaw <dshaw@jabberwocky.com>
|
2003-04-04 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* pkclist.c (algo_available): PGP 8 can use the SHA-256 hash.
|
* pkclist.c (algo_available): PGP 8 can use the SHA-256 hash.
|
||||||
|
|
|
@ -162,8 +162,8 @@ enum cmd_and_opt_values { aNull = 0,
|
||||||
#endif /* __riscos__ */
|
#endif /* __riscos__ */
|
||||||
oSKComments,
|
oSKComments,
|
||||||
oNoSKComments,
|
oNoSKComments,
|
||||||
oNoVersion,
|
|
||||||
oEmitVersion,
|
oEmitVersion,
|
||||||
|
oNoEmitVersion,
|
||||||
oCompletesNeeded,
|
oCompletesNeeded,
|
||||||
oMarginalsNeeded,
|
oMarginalsNeeded,
|
||||||
oMaxCertDepth,
|
oMaxCertDepth,
|
||||||
|
@ -551,8 +551,9 @@ static ARGPARSE_OPTS opts[] = {
|
||||||
{ oNoShowNotation, "no-show-notation", 0, "@" },
|
{ oNoShowNotation, "no-show-notation", 0, "@" },
|
||||||
{ oComment, "comment", 2, "@" },
|
{ oComment, "comment", 2, "@" },
|
||||||
{ oDefaultComment, "default-comment", 0, "@" },
|
{ oDefaultComment, "default-comment", 0, "@" },
|
||||||
{ oNoVersion, "no-version", 0, "@"},
|
|
||||||
{ oEmitVersion, "emit-version", 0, "@"},
|
{ oEmitVersion, "emit-version", 0, "@"},
|
||||||
|
{ oNoEmitVersion, "no-emit-version", 0, "@"},
|
||||||
|
{ oNoEmitVersion, "no-version", 0, "@"}, /* alias */
|
||||||
{ oNotDashEscaped, "not-dash-escaped", 0, "@" },
|
{ oNotDashEscaped, "not-dash-escaped", 0, "@" },
|
||||||
{ oEscapeFrom, "escape-from-lines", 0, "@" },
|
{ oEscapeFrom, "escape-from-lines", 0, "@" },
|
||||||
{ oNoEscapeFrom, "no-escape-from-lines", 0, "@" },
|
{ oNoEscapeFrom, "no-escape-from-lines", 0, "@" },
|
||||||
|
@ -1163,7 +1164,7 @@ main( int argc, char **argv )
|
||||||
opt.import_options=IMPORT_SK2PK;
|
opt.import_options=IMPORT_SK2PK;
|
||||||
opt.export_options=
|
opt.export_options=
|
||||||
EXPORT_INCLUDE_NON_RFC|EXPORT_INCLUDE_ATTRIBUTES;
|
EXPORT_INCLUDE_NON_RFC|EXPORT_INCLUDE_ATTRIBUTES;
|
||||||
opt.keyserver_options.import_options=IMPORT_REPAIR_HKP_SUBKEY_BUG;
|
opt.keyserver_options.import_options=IMPORT_REPAIR_PKS_SUBKEY_BUG;
|
||||||
opt.keyserver_options.export_options=
|
opt.keyserver_options.export_options=
|
||||||
EXPORT_INCLUDE_NON_RFC|EXPORT_INCLUDE_ATTRIBUTES;
|
EXPORT_INCLUDE_NON_RFC|EXPORT_INCLUDE_ATTRIBUTES;
|
||||||
opt.keyserver_options.include_subkeys=1;
|
opt.keyserver_options.include_subkeys=1;
|
||||||
|
@ -1451,8 +1452,8 @@ main( int argc, char **argv )
|
||||||
case oQuickRandom: quick_random_gen(1); break;
|
case oQuickRandom: quick_random_gen(1); break;
|
||||||
case oSKComments: opt.sk_comments=1; break;
|
case oSKComments: opt.sk_comments=1; break;
|
||||||
case oNoSKComments: opt.sk_comments=0; break;
|
case oNoSKComments: opt.sk_comments=0; break;
|
||||||
case oNoVersion: opt.no_version=1; break;
|
|
||||||
case oEmitVersion: opt.no_version=0; break;
|
case oEmitVersion: opt.no_version=0; break;
|
||||||
|
case oNoEmitVersion: opt.no_version=1; break;
|
||||||
case oCompletesNeeded: opt.completes_needed = pargs.r.ret_int; break;
|
case oCompletesNeeded: opt.completes_needed = pargs.r.ret_int; break;
|
||||||
case oMarginalsNeeded: opt.marginals_needed = pargs.r.ret_int; break;
|
case oMarginalsNeeded: opt.marginals_needed = pargs.r.ret_int; break;
|
||||||
case oMaxCertDepth: opt.max_cert_depth = pargs.r.ret_int; break;
|
case oMaxCertDepth: opt.max_cert_depth = pargs.r.ret_int; break;
|
||||||
|
|
11
g10/import.c
11
g10/import.c
|
@ -95,7 +95,8 @@ parse_import_options(char *str,unsigned int *options)
|
||||||
} import_opts[]=
|
} import_opts[]=
|
||||||
{
|
{
|
||||||
{"allow-local-sigs",IMPORT_ALLOW_LOCAL_SIGS},
|
{"allow-local-sigs",IMPORT_ALLOW_LOCAL_SIGS},
|
||||||
{"repair-hkp-subkey-bug",IMPORT_REPAIR_HKP_SUBKEY_BUG},
|
{"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG},
|
||||||
|
{"repair-pks-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG},
|
||||||
{"fast-import",IMPORT_FAST_IMPORT},
|
{"fast-import",IMPORT_FAST_IMPORT},
|
||||||
{"convert-sk-to-pk",IMPORT_SK2PK},
|
{"convert-sk-to-pk",IMPORT_SK2PK},
|
||||||
{NULL,0}
|
{NULL,0}
|
||||||
|
@ -465,7 +466,7 @@ remove_bad_stuff (KBNODE keyblock)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Walk through the subkeys on a pk to find if we have the HKP
|
/* Walk through the subkeys on a pk to find if we have the PKS
|
||||||
disease: multiple subkeys with their binding sigs stripped, and the
|
disease: multiple subkeys with their binding sigs stripped, and the
|
||||||
sig for the first subkey placed after the last subkey. That is,
|
sig for the first subkey placed after the last subkey. That is,
|
||||||
instead of "pk uid sig sub1 bind1 sub2 bind2 sub3 bind3" we have
|
instead of "pk uid sig sub1 bind1 sub2 bind2 sub3 bind3" we have
|
||||||
|
@ -475,7 +476,7 @@ remove_bad_stuff (KBNODE keyblock)
|
||||||
sub2 sub3". Returns TRUE if the keyblock was modified. */
|
sub2 sub3". Returns TRUE if the keyblock was modified. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fix_hkp_corruption(KBNODE keyblock)
|
fix_pks_corruption(KBNODE keyblock)
|
||||||
{
|
{
|
||||||
int changed=0,keycount=0;
|
int changed=0,keycount=0;
|
||||||
KBNODE node,last=NULL,sknode=NULL;
|
KBNODE node,last=NULL,sknode=NULL;
|
||||||
|
@ -639,8 +640,8 @@ import_one( const char *fname, KBNODE keyblock,
|
||||||
|
|
||||||
clear_kbnode_flags( keyblock );
|
clear_kbnode_flags( keyblock );
|
||||||
|
|
||||||
if((options&IMPORT_REPAIR_HKP_SUBKEY_BUG) && fix_hkp_corruption(keyblock))
|
if((options&IMPORT_REPAIR_PKS_SUBKEY_BUG) && fix_pks_corruption(keyblock))
|
||||||
log_info(_("key %08lX: HKP subkey corruption repaired\n"),
|
log_info(_("key %08lX: PKS subkey corruption repaired\n"),
|
||||||
(ulong)keyid[1]);
|
(ulong)keyid[1]);
|
||||||
|
|
||||||
rc = chk_self_sigs( fname, keyblock , pk, keyid, &non_self );
|
rc = chk_self_sigs( fname, keyblock , pk, keyid, &non_self );
|
||||||
|
|
|
@ -161,7 +161,7 @@ KBNODE make_mpi_comment_node( const char *s, MPI a );
|
||||||
|
|
||||||
/*-- import.c --*/
|
/*-- import.c --*/
|
||||||
#define IMPORT_ALLOW_LOCAL_SIGS 1
|
#define IMPORT_ALLOW_LOCAL_SIGS 1
|
||||||
#define IMPORT_REPAIR_HKP_SUBKEY_BUG 2
|
#define IMPORT_REPAIR_PKS_SUBKEY_BUG 2
|
||||||
#define IMPORT_FAST_IMPORT 4
|
#define IMPORT_FAST_IMPORT 4
|
||||||
#define IMPORT_SK2PK 8
|
#define IMPORT_SK2PK 8
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user