mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Fix a gpg2 problem with removed cards.
Allow runtime conf change for scdaemon. New commands for scdaemon.
This commit is contained in:
parent
618afc4231
commit
ec4a3eb3c5
9 changed files with 143 additions and 16 deletions
|
@ -698,6 +698,15 @@ agent_scd_pksign (const char *serialno, int hashalgo,
|
|||
if (indatalen*2 + 50 > DIM(line))
|
||||
return gpg_error (GPG_ERR_GENERAL);
|
||||
|
||||
/* Send the serialno command to initialize the connection. We don't
|
||||
care about the data returned. If the card has already been
|
||||
initialized, this is a very fast command. We request the openpgp
|
||||
card because that is waht we expect. */
|
||||
rc = assuan_transact (agent_ctx, "SCD SERIALNO openpgp",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
sprintf (line, "SCD SETDATA ");
|
||||
p = line + strlen (line);
|
||||
for (i=0; i < indatalen ; i++, p += 2 )
|
||||
|
@ -754,6 +763,15 @@ agent_scd_pkdecrypt (const char *serialno,
|
|||
if (indatalen*2 + 50 > DIM(line))
|
||||
return gpg_error (GPG_ERR_GENERAL);
|
||||
|
||||
/* Send the serialno command to initialize the connection. We don't
|
||||
care about the data returned. If the card has already been
|
||||
initialized, this is a very fast command. We request the openpgp
|
||||
card because that is waht we expect. */
|
||||
rc = assuan_transact (agent_ctx, "SCD SERIALNO openpgp",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
sprintf (line, "SCD SETDATA ");
|
||||
p = line + strlen (line);
|
||||
for (i=0; i < indatalen ; i++, p += 2 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue