[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-34-g49edeeb

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Jan 15 04:47:55 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  49edeebb43174865cf4fa2c170a42a8e4274c4f0 (commit)
      from  04cda6b7cc16f3f52c12d9d3e46c56701003496e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 49edeebb43174865cf4fa2c170a42a8e4274c4f0
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Jan 15 12:41:37 2014 +0900

    ecc: Fix _gcry_mpi_ec_p_new to allow secp256k1.
    
    * mpi/ec.c (_gcry_mpi_ec_p_new): Remove checking a!=0.
    * tests/t-mpi-point.c (context_alloc): Remove two spurious tests.
    
    --
    
    It is no problem when a==0.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/mpi/ec.c b/mpi/ec.c
index 9e007cd..4f35de0 100644
--- a/mpi/ec.c
+++ b/mpi/ec.c
@@ -495,7 +495,7 @@ _gcry_mpi_ec_p_new (gcry_ctx_t *r_ctx,
   mpi_ec_t ec;
 
   *r_ctx = NULL;
-  if (!p || !a || !mpi_cmp_ui (a, 0))
+  if (!p || !a)
     return GPG_ERR_EINVAL;
 
   ctx = _gcry_ctx_alloc (CONTEXT_TYPE_EC, sizeof *ec, ec_deinit);
diff --git a/tests/t-mpi-point.c b/tests/t-mpi-point.c
index ae52601..d60b3f0 100644
--- a/tests/t-mpi-point.c
+++ b/tests/t-mpi-point.c
@@ -434,28 +434,18 @@ context_alloc (void)
   gcry_mpi_release (a);
   gcry_ctx_release (ctx);
 
-  p = gcry_mpi_set_ui (NULL, 0);
+  p = NULL;
   a = gcry_mpi_set_ui (NULL, 0);
-  err = ec_p_new (&ctx, p, a);
-  if (!err || gpg_err_code (err) != GPG_ERR_EINVAL)
-    fail ("ec_p_new: bad parameter detection failed (1)\n");
-
-  gcry_mpi_set_ui (p, 1);
-  err = ec_p_new (&ctx, p, a);
-  if (!err || gpg_err_code (err) != GPG_ERR_EINVAL)
-    fail ("ec_p_new: bad parameter detection failed (2)\n");
 
-  gcry_mpi_release (p);
-  p = NULL;
   err = ec_p_new (&ctx, p, a);
   if (!err || gpg_err_code (err) != GPG_ERR_EINVAL)
-    fail ("ec_p_new: bad parameter detection failed (3)\n");
+    fail ("ec_p_new: bad parameter detection failed (1)\n");
 
   gcry_mpi_release (a);
   a = NULL;
   err = ec_p_new (&ctx, p, a);
   if (!err || gpg_err_code (err) != GPG_ERR_EINVAL)
-    fail ("ec_p_new: bad parameter detection failed (4)\n");
+    fail ("ec_p_new: bad parameter detection failed (2)\n");
 
 }
 

-----------------------------------------------------------------------

Summary of changes:
 mpi/ec.c            |    2 +-
 tests/t-mpi-point.c |   16 +++-------------
 2 files changed, 4 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits




More information about the Gcrypt-devel mailing list