mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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:
parent
f3c98b8cb5
commit
5b8593135f
8 changed files with 24 additions and 14 deletions
|
@ -1095,7 +1095,7 @@ pubkey_algo_string (gcry_sexp_t s_pkey, enum gcry_pk_algos *r_algoid)
|
|||
{
|
||||
const char *curve = gcry_pk_get_curve (s_pkey, 0, NULL);
|
||||
const char *name = openpgp_oid_to_curve
|
||||
(openpgp_curve_to_oid (curve, NULL), 0);
|
||||
(openpgp_curve_to_oid (curve, NULL, NULL), 0);
|
||||
|
||||
if (name)
|
||||
result = xtrystrdup (name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue