1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-05-24 16:43:28 +02:00

agent: We should use a macro for the keygrip len in new code.

* agent/divert-scd.c (agent_card_ecc_kem): Use KEYGRIP_LEN constant.
This commit is contained in:
Werner Koch 2025-05-13 09:56:59 +02:00
parent 309cfb3a4c
commit 7c2e7bcc41
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -507,9 +507,9 @@ agent_card_ecc_kem (ctrl_t ctrl, const unsigned char *ecc_ct,
char *ecdh = NULL;
size_t len;
int rc;
char hexgrip[41];
char hexgrip[KEYGRIP_LEN*2+1];
bin2hex (ctrl->keygrip, 20, hexgrip);
bin2hex (ctrl->keygrip, KEYGRIP_LEN, hexgrip);
rc = agent_card_pkdecrypt (ctrl, hexgrip, getpin_cb, ctrl, NULL,
ecc_ct, ecc_point_len, &ecdh, &len, NULL);
if (rc)