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
10
scd/app.c
10
scd/app.c
|
@ -314,7 +314,6 @@ app_getattr (APP app, CTRL ctrl, const char *name)
|
|||
}
|
||||
if (name && !strcmp (name, "SERIALNO"))
|
||||
{
|
||||
char *serial_and_stamp;
|
||||
char *serial;
|
||||
time_t stamp;
|
||||
int rc;
|
||||
|
@ -322,15 +321,8 @@ app_getattr (APP app, CTRL ctrl, const char *name)
|
|||
rc = app_get_serial_and_stamp (app, &serial, &stamp);
|
||||
if (rc)
|
||||
return rc;
|
||||
rc = asprintf (&serial_and_stamp, "%s %lu",
|
||||
serial, (unsigned long)stamp);
|
||||
rc = (rc < 0)? gpg_error_from_errno (errno) : 0;
|
||||
send_status_info (ctrl, "SERIALNO", serial, strlen (serial), NULL, 0);
|
||||
xfree (serial);
|
||||
if (rc)
|
||||
return rc;
|
||||
send_status_info (ctrl, "SERIALNO",
|
||||
serial_and_stamp, strlen (serial_and_stamp), NULL, 0);
|
||||
free (serial_and_stamp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue