aboutsummaryrefslogtreecommitdiffstats
path: root/sm/gpgsm.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-02-17 15:05:04 +0000
committerWerner Koch <[email protected]>2004-02-17 15:05:04 +0000
commit45a817bf4a6f7624d49cd61247b7efeb3b7ad726 (patch)
treefc19cfea9fba63e9e8455fb9f8ad2ff8d8bf6fa0 /sm/gpgsm.c
parentAdded new options (diff)
downloadgnupg-45a817bf4a6f7624d49cd61247b7efeb3b7ad726.tar.gz
gnupg-45a817bf4a6f7624d49cd61247b7efeb3b7ad726.zip
* gpgsm.c: New option --with-md5-fingerprint.
* keylist.c (list_cert_std): Print MD5 fpr. * gpgsm.c: New options --with-validation. * server.c (option_handler): New option "with-validation". * keylist.c (list_cert_std, list_internal_keys): New args CTRL and WITH_VALIDATION. Changed callers to set it. (list_external_cb, list_external_keys): Pass CTRL to the callback. (list_cert_colon): Add arg CTRL. Check validation if requested. * certchain.c (unknown_criticals, allowed_ca, check_cert_policy) (gpgsm_validate_chain): New args LISTMODE and FP. (do_list): New helper for info output. (find_up): New arg FIND_NEXT. (gpgsm_validate_chain): After a bad signature try again with other CA certificates. * import.c (print_imported_status): New arg NEW_CERT. Print additional STATUS_IMPORT_OK becuase that is what gpgme expects. (check_and_store): Always call above function after import. * server.c (get_status_string): Added STATUS_IMPORT_OK.
Diffstat (limited to 'sm/gpgsm.c')
-rw-r--r--sm/gpgsm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index fa3e1b203..0734c0644 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -1,5 +1,5 @@
/* gpgsm.c - GnuPG for S/MIME
- * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -125,6 +125,7 @@ enum cmd_and_opt_values {
oTextmode,
oFingerprint,
oWithFingerprint,
+ oWithMD5Fingerprint,
oAnswerYes,
oAnswerNo,
oKeyring,
@@ -158,6 +159,7 @@ enum cmd_and_opt_values {
oHomedir,
oWithColons,
oWithKeyData,
+ oWithValidation,
oSkipVerify,
oCompressKeys,
oCompressSigs,
@@ -378,6 +380,8 @@ static ARGPARSE_OPTS opts[] = {
{ oNoBatch, "no-batch", 0, "@" },
{ oWithColons, "with-colons", 0, "@"},
{ oWithKeyData,"with-key-data", 0, "@"},
+ { oWithValidation, "with-validation", 0, "@"},
+ { oWithMD5Fingerprint, "with-md5-fingerprint", 0, "@"},
{ aListKeys, "list-key", 0, "@" }, /* alias */
{ aListSigs, "list-sig", 0, "@" }, /* alias */
{ aListSigs, "check-sig",0, "@" }, /* alias */
@@ -925,6 +929,8 @@ main ( int argc, char **argv)
case oStatusFD: ctrl.status_fd = pargs.r.ret_int; break;
case oLoggerFD: log_set_fd (pargs.r.ret_int ); break;
+ case oWithMD5Fingerprint:
+ opt.with_md5_fingerprint=1; /*fall thru*/
case oWithFingerprint:
with_fpr=1; /*fall thru*/
case oFingerprint:
@@ -980,6 +986,7 @@ main ( int argc, char **argv)
case oWithKeyData: opt.with_key_data=1; /* fall thru */
case oWithColons: ctrl.with_colons = 1; break;
+ case oWithValidation: ctrl.with_validation=1; break;
case oSkipVerify: opt.skip_verify=1; break;
@@ -1291,7 +1298,8 @@ main ( int argc, char **argv)
case aListExternalKeys:
for (sl=NULL; argc; argc--, argv++)
add_to_strlist (&sl, *argv);
- gpgsm_list_keys (&ctrl, sl, stdout, (0 | (1<<7)));
+ gpgsm_list_keys (&ctrl, sl, stdout,
+ (0 | (1<<7)));
free_strlist(sl);
break;