From 945e7ab0ddedf5f58afd97d81e101939de5b5d89 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 24 Oct 2016 11:20:14 +0900 Subject: [PATCH] common: Fix openpgp_is_curve_supported. * common/openpgp-oid.c (openpgp_is_curve_supported): Support both of canonical name of the curve and alias. -- Only alias (the name for print) was allowed before this change. Signed-off-by: NIIBE Yutaka --- common/openpgp-oid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c index af3cbbe1a..67f23caae 100644 --- a/common/openpgp-oid.c +++ b/common/openpgp-oid.c @@ -424,8 +424,8 @@ openpgp_is_curve_supported (const char *name, int *r_algo) *r_algo = 0; for (idx = 0; idx < DIM (oidtable) && oidtable[idx].name; idx++) { - if (!strcmp (name, (oidtable[idx].alias? oidtable[idx].alias - /**/ : oidtable[idx].name)) + if ((!strcmp (name, oidtable[idx].name) + || (oidtable[idx].alias && !strcmp (name, (oidtable[idx].alias)))) && curve_supported_p (oidtable[idx].name)) { if (r_algo)