1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

common: Extend the openpgp_curve_to_oid function.

* common/openpgp-oid.c (openpgp_curve_to_oid): Add optional arg R_NBITS.
Change all callers.
--

In particular for ed25519 and cv25519 it is quite useful to have an
ability to get the required algorithm.

(cherry picked from commit 24095101a5)
This commit is contained in:
Werner Koch 2020-02-11 14:38:03 +01:00
parent f3c98b8cb5
commit 5b8593135f
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
8 changed files with 24 additions and 14 deletions

View file

@ -1160,7 +1160,7 @@ ecckey_from_sexp (gcry_mpi_t *array, gcry_sexp_t sexp, int algo)
goto leave;
}
gcry_sexp_release (l2);
oidstr = openpgp_curve_to_oid (curve, &nbits);
oidstr = openpgp_curve_to_oid (curve, &nbits, NULL);
if (!oidstr)
{
/* That can't happen because we used one of the curves