[Pkg-gnupg-commit] [gnupg2] 150/292: common: Fix openpgp_is_curve_supported.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Nov 21 06:31:36 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 945e7ab0ddedf5f58afd97d81e101939de5b5d89
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Oct 24 11:20:14 2016 +0900

    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 <gniibe at fsij.org>
---
 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 af3cbbe..67f23ca 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)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list