1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* 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.
This commit is contained in:
Werner Koch 2002-01-25 16:41:13 +00:00
parent ecb785ac44
commit 151deac0df
7 changed files with 235 additions and 10 deletions

View file

@ -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