1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-10-31 20:08:43 +01:00

common: Add a default OpenPGP ECC mapping.

* common/openpgp-oid.c (map_gcry_pk_to_openpgp): Map ECC to ECDSA
which is similar to what we do at opther places in gpg.
--

GnuPG-bug-id: 5555
This commit is contained in:
Werner Koch 2022-08-01 10:34:16 +02:00
parent 67e510cbf7
commit 8e63e813c7
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -581,6 +581,7 @@ map_gcry_pk_to_openpgp (enum gcry_pk_algos algo)
case GCRY_PK_EDDSA: return PUBKEY_ALGO_EDDSA; case GCRY_PK_EDDSA: return PUBKEY_ALGO_EDDSA;
case GCRY_PK_ECDSA: return PUBKEY_ALGO_ECDSA; case GCRY_PK_ECDSA: return PUBKEY_ALGO_ECDSA;
case GCRY_PK_ECDH: return PUBKEY_ALGO_ECDH; case GCRY_PK_ECDH: return PUBKEY_ALGO_ECDH;
case GCRY_PK_ECC: return PUBKEY_ALGO_ECDSA; /* Most useful mapping. */
default: return algo < 110 ? (pubkey_algo_t)algo : 0; default: return algo < 110 ? (pubkey_algo_t)algo : 0;
} }
} }