diff options
author | Werner Koch <wk@gnupg.org> | 2007-12-13 16:45:40 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2007-12-13 16:45:40 +0100 |
commit | 9d66580cff83d5b6cb6dc52ecc2fcfbfe1e94315 (patch) | |
tree | 7373ba64496d9695d194ed16c54abee7f5f887ba /sm/gpgsm.c | |
parent | Allow type 20 keys only with option --rfc2440. (diff) | |
download | gnupg2-9d66580cff83d5b6cb6dc52ecc2fcfbfe1e94315.tar.xz gnupg2-9d66580cff83d5b6cb6dc52ecc2fcfbfe1e94315.zip |
Allow verification of some broken S-TRUST generated signatures.
Diffstat (limited to 'sm/gpgsm.c')
-rw-r--r-- | sm/gpgsm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c index 93474b37a..71f8e2cc1 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -174,6 +174,7 @@ enum cmd_and_opt_values { oOpenPGP, oCipherAlgo, oDigestAlgo, + oExtraDigestAlgo, oCompressAlgo, oCommandFD, oNoVerbose, @@ -388,6 +389,7 @@ static ARGPARSE_OPTS opts[] = { { oCipherAlgo, "cipher-algo", 2 , N_("|NAME|use cipher algorithm NAME")}, { oDigestAlgo, "digest-algo", 2 , N_("|NAME|use message digest algorithm NAME")}, + { oExtraDigestAlgo, "extra-digest-algo", 2 , "@" }, #if 0 { oCompressAlgo, "compress-algo", 1 , N_("|N|use compress algorithm N")}, #endif @@ -842,6 +844,7 @@ main ( int argc, char **argv) int use_random_seed = 1; int with_fpr = 0; char *def_digest_string = NULL; + char *extra_digest_algo = NULL; enum cmd_and_opt_values cmd = 0; struct server_control_s ctrl; certlist_t recplist = NULL; @@ -1298,6 +1301,10 @@ main ( int argc, char **argv) } break; + case oExtraDigestAlgo: + extra_digest_algo = pargs.r.ret_str; + break; + case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break; case oNoRandomSeedFile: use_random_seed = 0; break; @@ -1441,6 +1448,12 @@ main ( int argc, char **argv) if (our_md_test_algo(opt.def_digest_algo) ) log_error (_("selected digest algorithm is invalid\n")); } + if (extra_digest_algo) + { + opt.extra_digest_algo = gcry_md_map_name (extra_digest_algo); + if (our_md_test_algo (opt.extra_digest_algo) ) + log_error (_("selected digest algorithm is invalid\n")); + } } if (log_get_errorcount(0)) |