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:
parent
ecb785ac44
commit
151deac0df
7 changed files with 235 additions and 10 deletions
14
sm/server.c
14
sm/server.c
|
@ -57,7 +57,18 @@ close_message_fd (CTRL ctrl)
|
|||
static int
|
||||
option_handler (ASSUAN_CONTEXT ctx, const char *key, const char *value)
|
||||
{
|
||||
log_debug ("got option key=`%s' value=`%s'\n", key, value);
|
||||
CTRL ctrl = assuan_get_pointer (ctx);
|
||||
|
||||
if (!strcmp (key, "include-certs"))
|
||||
{
|
||||
int i = *value? atoi (value) : -1;
|
||||
if (ctrl->include_certs < -1)
|
||||
return ASSUAN_Parameter_Error;
|
||||
ctrl->include_certs = i;
|
||||
}
|
||||
else
|
||||
return ASSUAN_Invalid_Option;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -458,6 +469,7 @@ gpgsm_server (void)
|
|||
struct server_control_s ctrl;
|
||||
|
||||
memset (&ctrl, 0, sizeof ctrl);
|
||||
gpgsm_init_default_ctrl (&ctrl);
|
||||
|
||||
/* For now we use a simple pipe based server so that we can work
|
||||
from scripts. We will later add options to run as a daemon and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue