diff options
author | NIIBE Yutaka <[email protected]> | 2016-10-24 02:20:14 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2016-10-24 02:20:14 +0000 |
commit | 945e7ab0ddedf5f58afd97d81e101939de5b5d89 (patch) | |
tree | d6d264a25bcd7ee6d39df56d0b78b7281f436ce0 | |
parent | g10: Fix card keygen for decryption. (diff) | |
download | gnupg-945e7ab0ddedf5f58afd97d81e101939de5b5d89.tar.gz gnupg-945e7ab0ddedf5f58afd97d81e101939de5b5d89.zip |
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | common/openpgp-oid.c | 4 |
1 files 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) |