diff options
author | Werner Koch <[email protected]> | 2020-02-11 13:38:03 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-02-11 13:40:54 +0000 |
commit | 24095101a5069f15a9aea7512498ac436a76814a (patch) | |
tree | 58b6e8f20ed4332599cba202003c52062d800b70 /common/util.h | |
parent | doc: Improve the warning section of the gpg man page. (diff) | |
download | gnupg-24095101a5069f15a9aea7512498ac436a76814a.tar.gz gnupg-24095101a5069f15a9aea7512498ac436a76814a.zip |
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.
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/util.h b/common/util.h index a6bab2415..64d6c1627 100644 --- a/common/util.h +++ b/common/util.h @@ -238,7 +238,8 @@ int openpgp_oidbuf_is_ed25519 (const void *buf, size_t len); int openpgp_oid_is_ed25519 (gcry_mpi_t a); int openpgp_oidbuf_is_cv25519 (const void *buf, size_t len); int openpgp_oid_is_cv25519 (gcry_mpi_t a); -const char *openpgp_curve_to_oid (const char *name, unsigned int *r_nbits); +const char *openpgp_curve_to_oid (const char *name, + unsigned int *r_nbits, int *r_algo); const char *openpgp_oid_to_curve (const char *oid, int canon); const char *openpgp_oid_or_name_to_curve (const char *oidname, int canon); const char *openpgp_enum_curves (int *idxp); |