mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* findkey.c (modify_description): Keep invalid % escapes, so that
%0A may pass through. * agent.h (server_control_s): New field USE_AUTH_CALL. * call-scd.c (agent_card_pksign): Make use of it. * command-ssh.c (data_sign): Set the flag. (ssh_send_key_public): New arg OVERRIDE_COMMENT. (card_key_available): Add new arg CARDSN. (ssh_handler_request_identities): Use the card s/n as comment. (sexp_key_extract): Use GCRYMPI_FMT_STD. (data_sign): Ditto. * learncard.c (make_shadow_info): Moved to .. * protect.c (make_shadow_info): .. here. Return NULL on malloc failure. Made global. * agent.h: Add prototype. * xasprintf.c (xtryasprintf): New. * app-openpgp.c (get_public_key): Make sure not to return negative numbers. (do_sign): Allow passing of indata with algorithm prefix. (do_auth): Allow OPENPGP.3 as an alternative ID. * app.c (app_getattr): Return just the S/N but not the timestamp. * no-libgcrypt.c (gcry_strdup): New.
This commit is contained in:
parent
1f1f28555a
commit
faef9f929b
18 changed files with 368 additions and 108 deletions
|
@ -225,15 +225,16 @@ start_scd (ctrl_t ctrl)
|
|||
/* Tell the scdaemon that we want him to send us an event signal.
|
||||
But only do this if we are running as a regular sever and not
|
||||
simply as a pipe server. */
|
||||
if (ctrl->connection_fd != -1)
|
||||
{
|
||||
#ifndef HAVE_W32_SYSTEM
|
||||
char buf[100];
|
||||
/* Fixme: gpg-agent does not use this signal yet. */
|
||||
/* if (ctrl->connection_fd != -1) */
|
||||
/* { */
|
||||
/* #ifndef HAVE_W32_SYSTEM */
|
||||
/* char buf[100]; */
|
||||
|
||||
sprintf (buf, "OPTION event-signal=%d", SIGUSR2);
|
||||
assuan_transact (scd_ctx, buf, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
/* sprintf (buf, "OPTION event-signal=%d", SIGUSR2); */
|
||||
/* assuan_transact (scd_ctx, buf, NULL, NULL, NULL, NULL, NULL, NULL); */
|
||||
/* #endif */
|
||||
/* } */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -505,7 +506,8 @@ agent_card_pksign (ctrl_t ctrl,
|
|||
inqparm.ctx = scd_ctx;
|
||||
inqparm.getpin_cb = getpin_cb;
|
||||
inqparm.getpin_cb_arg = getpin_cb_arg;
|
||||
snprintf (line, DIM(line)-1, "PKSIGN %s", keyid);
|
||||
snprintf (line, DIM(line)-1,
|
||||
ctrl->use_auth_call? "PKAUTH %s":"PKSIGN %s", keyid);
|
||||
line[DIM(line)-1] = 0;
|
||||
rc = assuan_transact (scd_ctx, line,
|
||||
membuf_data_cb, &data,
|
||||
|
@ -518,7 +520,7 @@ agent_card_pksign (ctrl_t ctrl,
|
|||
}
|
||||
sigbuf = get_membuf (&data, &sigbuflen);
|
||||
|
||||
/* create an S-expression from it which is formatted like this:
|
||||
/* Create an S-expression from it which is formatted like this:
|
||||
"(7:sig-val(3:rsa(1:sSIGBUFLEN:SIGBUF)))" */
|
||||
*r_buflen = 21 + 11 + sigbuflen + 4;
|
||||
*r_buf = xtrymalloc (*r_buflen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue