mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Pass ECDH parameters to OpenPGP smartcards
* g10/call-agent.c (agent_keytocard): Add arg ecdh_param_str.
* g10/keyid.c (ecdh_param_str_from_pk): New.
* g10/card-util.c (card_store_subkey): Pass ECDH params to writekey.
* g10/keygen.c (card_store_key_with_backup): Ditto.
--
Backported from 2.4 - here the gpg part.
See-commit: c03ba92576
This is related to
GnuPG-bug-id: 6378
This commit is contained in:
parent
d03d0add12
commit
92af3f88a9
6 changed files with 68 additions and 11 deletions
|
@ -957,7 +957,8 @@ agent_scd_apdu (const char *hexapdu, unsigned int *r_sw)
|
|||
*/
|
||||
int
|
||||
agent_keytocard (const char *hexgrip, int keyno, int force,
|
||||
const char *serialno, const char *timestamp)
|
||||
const char *serialno, const char *timestamp,
|
||||
const char *ecdh_param_str)
|
||||
{
|
||||
int rc;
|
||||
char line[ASSUAN_LINELENGTH];
|
||||
|
@ -965,8 +966,9 @@ agent_keytocard (const char *hexgrip, int keyno, int force,
|
|||
|
||||
memset (&parm, 0, sizeof parm);
|
||||
|
||||
snprintf (line, DIM(line), "KEYTOCARD %s%s %s OPENPGP.%d %s",
|
||||
force?"--force ": "", hexgrip, serialno, keyno, timestamp);
|
||||
snprintf (line, DIM(line), "KEYTOCARD %s%s %s OPENPGP.%d %s%s%s",
|
||||
force?"--force ": "", hexgrip, serialno, keyno, timestamp,
|
||||
ecdh_param_str? " ":"", ecdh_param_str? ecdh_param_str:"");
|
||||
|
||||
rc = start_agent (NULL, 1);
|
||||
if (rc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue