summaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-02-10 00:31:07 +0100
committerWerner Koch <wk@gnupg.org>2020-02-10 00:31:07 +0100
commit332a72f7340895e7db1e9c5f89046f722bb7465b (patch)
tree28ae6df05fc5d9fbc3564e86bf0f1803e81251c8 /common/util.h
parentcommon: Remove duplicated call to a function. (diff)
downloadgnupg2-332a72f7340895e7db1e9c5f89046f722bb7465b.tar.xz
gnupg2-332a72f7340895e7db1e9c5f89046f722bb7465b.zip
common: Extend the new get_keyalgo_string function
* common/openpgp-oid.c (openpgp_oid_or_name_to_curve): New. (get_keyalgo_string): Use it. -- We do not always have an OID, so except the name or the alias of the curve as well. This creates a second entry mapping to the same name but that does not matter. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index 9d73412c3..8ad805832 100644
--- a/common/util.h
+++ b/common/util.h
@@ -232,6 +232,7 @@ 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_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);
const char *openpgp_is_curve_supported (const char *name,
int *r_algo, unsigned int *r_nbits);