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

* card-util.c (card_edit): New command "passwd". Add logic to

check the PIN in advance.
(card_status): Add new args to return the serial number.  Changed
all callers.
* call-agent.c (agent_scd_checkpin): New.
This commit is contained in:
Werner Koch 2003-10-21 17:12:21 +00:00
parent cf2c58e686
commit 99277d21c1
7 changed files with 131 additions and 21 deletions

View file

@ -869,3 +869,25 @@ agent_scd_change_pin (int chvno)
return map_assuan_err (rc);
}
/* Perform a CHECKPIN operation. SERIALNO should be the seriial
number of the card - optioanlly followed by the fingerprint;
however the fingerprint is ignored here. */
int
agent_scd_checkpin (const char *serialno)
{
int rc;
char line[ASSUAN_LINELENGTH];
rc = start_agent ();
if (rc)
return rc;
snprintf (line, DIM(line)-1, "SCD CHECKPIN %s", serialno);
line[DIM(line)-1] = 0;
return assuan_transact (agent_ctx, line,
NULL, NULL,
NULL, NULL, NULL, NULL);
}