From 6c1dd3afd12b44f28d6672fd5805a34edff04631 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 3 Apr 2024 14:13:57 +0200 Subject: common: Extend openpgp_oid_to_curve to return an abbreviated name. * common/openpgp-oid.c (oidtable): Add column "abbr" and set them for Brainpool. (openpgp_oid_to_curve): Rename arg "canon" to "mode" and implement mode 2. -- For dual algorithms (PQC) we need shorter versions of brainpool to avoid names which otherwise might be capped when printed. --- common/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/util.h') diff --git a/common/util.h b/common/util.h index 7948b5d82..7b2601db1 100644 --- a/common/util.h +++ b/common/util.h @@ -229,7 +229,7 @@ int openpgp_oid_is_cv448 (gcry_mpi_t a); int openpgp_oid_is_ed448 (gcry_mpi_t a); 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_to_curve (const char *oid, int mode); 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, -- cgit v1.2.3