diff options
author | Werner Koch <[email protected]> | 2025-07-29 13:32:21 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2025-07-29 13:33:03 +0000 |
commit | f6bd1ad0f8e9cff0aea72d488611e5f2ff077826 (patch) | |
tree | aaefc1cd89fe9f53dd80f9a32421bf7176e81895 | |
parent | agent: Fix for smartcard decryption, checking compressed format. (diff) | |
download | gnupg-f6bd1ad0f8e9cff0aea72d488611e5f2ff077826.tar.gz gnupg-f6bd1ad0f8e9cff0aea72d488611e5f2ff077826.zip |
agent: Another fix for our use of point prefixes.
* agent/divert-scd.c (agent_card_ecc_kem): Check for 0x41 prefix.
--
GnuPG-bug-id: 7709
-rw-r--r-- | agent/divert-scd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/divert-scd.c b/agent/divert-scd.c index e0b5164b5..cd80f09f1 100644 --- a/agent/divert-scd.c +++ b/agent/divert-scd.c @@ -518,7 +518,7 @@ agent_card_ecc_kem (ctrl_t ctrl, const unsigned char *ecc_ct, if (len == ecc_point_len) memcpy (ecc_ecdh, ecdh, len); else if (len && (len - 1) * 2 == ecc_point_len - 1 - && (ecdh[0] & ~1) == 0x02) + && (ecdh[0] == 0x41 || (ecdh[0] & ~1) == 0x02)) { /* It's x-coordinate-only (compressed) point representation. */ memcpy (ecc_ecdh, ecdh, len); |