diff options
author | Werner Koch <[email protected]> | 2002-01-25 16:41:13 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2002-01-25 16:41:13 +0000 |
commit | 151deac0dfcc712a00844943445cbde7c6b0eb38 (patch) | |
tree | fa0b13b368613ba2ec69d7261377d4e4f54d84a9 /sm/gpgsm.c | |
parent | * assuan-socket-connect.c (LOGERRORX): and removed typo. (diff) | |
download | gnupg-151deac0dfcc712a00844943445cbde7c6b0eb38.tar.gz gnupg-151deac0dfcc712a00844943445cbde7c6b0eb38.zip |
* gpgsm.c (main): Disable core dumps.
* sign.c (add_certificate_list): New.
(gpgsm_sign): Add the certificates to the CMS object.
* certpath.c (gpgsm_walk_cert_chain): New.
* gpgsm.h (server_control_s): Add included_certs.
* gpgsm.c: Add option --include-certs.
(gpgsm_init_default_ctrl): New.
(main): Call it.
* server.c (gpgsm_server): Ditto.
(option_handler): Support --include-certs.
Diffstat (limited to '')
-rw-r--r-- | sm/gpgsm.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c index d9b9e27b9..0203c5a2a 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -33,6 +33,7 @@ #include "../kbx/keybox.h" /* malloc hooks */ #include "i18n.h" #include "keydb.h" +#include "sysutils.h" enum cmd_and_opt_values { aNull = 0, @@ -98,6 +99,14 @@ enum cmd_and_opt_values { oDisableCRLChecks, oEnableCRLChecks, + oIncludeCerts, + + + + + + + oTextmode, oFingerprint, oWithFingerprint, @@ -229,6 +238,9 @@ static ARGPARSE_OPTS opts[] = { { oDisableCRLChecks, "disable-crl-checks", 0, N_("never consult a CRL")}, { oEnableCRLChecks, "enable-crl-checks", 0, "@"}, + { oIncludeCerts, "include-certs", 1, + N_("|N|number of certificates to include") }, + #if 0 { oDefRecipient, "default-recipient" ,2, @@ -577,7 +589,7 @@ main ( int argc, char **argv) gcry_control (GCRYCTL_USE_SECURE_RNDPOOL); - may_coredump = 0/* FIXME: disable_core_dumps()*/; + may_coredump = disable_core_dumps (); /* FIXME: init_signals();*/ @@ -631,8 +643,9 @@ main ( int argc, char **argv) assuan_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free); keybox_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free); - /* Setup a default control structure */ + /* Setup a default control structure for command line mode */ memset (&ctrl, 0, sizeof ctrl); + gpgsm_init_default_ctrl (&ctrl); ctrl.no_server = 1; ctrl.status_fd = -1; /* not status output */ ctrl.autodetect_encoding = 1; @@ -741,7 +754,8 @@ main ( int argc, char **argv) case oEnableCRLChecks: opt.no_crl_check = 0; break; - + + case oIncludeCerts: ctrl.include_certs = pargs.r.ret_int; break; case oOutput: opt.outfile = pargs.r.ret_str; break; @@ -1198,6 +1212,14 @@ gpgsm_exit (int rc) } +void +gpgsm_init_default_ctrl (struct server_control_s *ctrl) +{ + ctrl->include_certs = 1; +} + + + /* Check whether the filename has the form "-&nnnn", where n is a non-zero number. Returns this number or -1 if it is not the case. */ static int |