gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, gnutls_3_0_x, updated. gnutls_3_0_1-43-ge5a3163


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, gnutls_3_0_x, updated. gnutls_3_0_1-43-ge5a3163
Date: Mon, 29 Aug 2011 16:29:13 +0000

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 "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=e5a3163e6cd1e5dce10a5c9a41455b08e3313ea2

The branch, gnutls_3_0_x has been updated
       via  e5a3163e6cd1e5dce10a5c9a41455b08e3313ea2 (commit)
       via  85c70639b4a51833e254726f47ec74b788deaa56 (commit)
       via  3274e47af5d0731f3e3fd6ccd19af66e0a66aba5 (commit)
      from  56aff6a6e9962c0f31d44e4401f61ac1f3489c17 (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 e5a3163e6cd1e5dce10a5c9a41455b08e3313ea2
Merge: 56aff6a 85c7063
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon Aug 29 18:28:39 2011 +0200

    Merge branch 'master' into gnutls_3_0_x

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

Summary of changes:
 lib/nettle/ecc.h                        |    5 +----
 lib/nettle/ecc_free.c                   |    1 -
 lib/nettle/ecc_make_key.c               |    8 +++-----
 lib/nettle/ecc_map.c                    |    3 ++-
 lib/nettle/ecc_mulmod.c                 |    6 ++----
 lib/nettle/ecc_projective_add_point.c   |    6 ++----
 lib/nettle/ecc_projective_dbl_point.c   |    5 ++---
 lib/nettle/ecc_projective_dbl_point_3.c |    5 ++---
 lib/nettle/ecc_shared_secret.c          |    6 ++----
 lib/nettle/ecc_sign_hash.c              |    5 ++---
 lib/nettle/ecc_verify_hash.c            |    6 ++----
 tests/suite/testcompat                  |    6 ++++++
 12 files changed, 26 insertions(+), 36 deletions(-)

diff --git a/lib/nettle/ecc.h b/lib/nettle/ecc.h
index 07a882c..caa465b 100644
--- a/lib/nettle/ecc.h
+++ b/lib/nettle/ecc.h
@@ -2,10 +2,7 @@
 #include <nettle/nettle-types.h>
 #include <nettle/dsa.h>
 #include <nettle/bignum.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <assert.h>
+#include <gnutls_int.h>
 
 /* assume y^2 = x^3 - 3x + b
  * instead of the generic y^2 = x^3 + ax + b
diff --git a/lib/nettle/ecc_free.c b/lib/nettle/ecc_free.c
index 1d7dd64..81a9241 100644
--- a/lib/nettle/ecc_free.c
+++ b/lib/nettle/ecc_free.c
@@ -36,7 +36,6 @@
 void
 ecc_free (ecc_key * key)
 {
-  assert (key != NULL);
   mp_clear_multi (&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, &key->k,
                   &key->prime, &key->order, &key->Gx, &key->Gy, NULL);
 }
diff --git a/lib/nettle/ecc_make_key.c b/lib/nettle/ecc_make_key.c
index 42ac6df..3476276 100644
--- a/lib/nettle/ecc_make_key.c
+++ b/lib/nettle/ecc_make_key.c
@@ -50,8 +50,8 @@ ecc_make_key_ex (void *random_ctx, nettle_random_func random, 
ecc_key * key,
   unsigned char *buf;
   int keysize;
 
-  assert (key != NULL);
-  assert (random != NULL);
+  if (key == NULL || random == NULL)
+    return -1;
 
   keysize = nettle_mpz_sizeinbase_256_u (order);
 
@@ -59,9 +59,7 @@ ecc_make_key_ex (void *random_ctx, nettle_random_func random, 
ecc_key * key,
   base = NULL;
   buf = malloc (keysize);
   if (buf == NULL)
-    {
-      return -1;
-    }
+    return -1;
 
   /* make up random string */
   random (random_ctx, keysize, buf);
diff --git a/lib/nettle/ecc_map.c b/lib/nettle/ecc_map.c
index 561c3b2..30484da 100644
--- a/lib/nettle/ecc_map.c
+++ b/lib/nettle/ecc_map.c
@@ -42,7 +42,8 @@ ecc_map (ecc_point * P, mpz_t modulus)
   mpz_t t1, t2;
   int err;
 
-  assert (P != NULL);
+  if (P == NULL)
+    return -1;
 
   if ((err = mp_init_multi (&t1, &t2, NULL)) != 0)
     {
diff --git a/lib/nettle/ecc_mulmod.c b/lib/nettle/ecc_mulmod.c
index fff0fd0..e9eebe3 100644
--- a/lib/nettle/ecc_mulmod.c
+++ b/lib/nettle/ecc_mulmod.c
@@ -48,10 +48,8 @@ ecc_mulmod (mpz_t k, ecc_point * G, ecc_point * R, mpz_t a, 
mpz_t modulus,
   unsigned long buf;
   int bitcnt, mode, digidx;
 
-  assert (k != NULL);
-  assert (G != NULL);
-  assert (R != NULL);
-  assert (modulus != NULL);
+  if (k == NULL || G == NULL || R == NULL || modulus == NULL)
+    return -1;
 
   /* alloc ram for window temps */
   for (i = 0; i < 3; i++)
diff --git a/lib/nettle/ecc_projective_add_point.c 
b/lib/nettle/ecc_projective_add_point.c
index 5a8caaf..292a0a3 100644
--- a/lib/nettle/ecc_projective_add_point.c
+++ b/lib/nettle/ecc_projective_add_point.c
@@ -45,10 +45,8 @@ ecc_projective_add_point (ecc_point * P, ecc_point * Q, 
ecc_point * R,
   mpz_t t1, t2, x, y, z;
   int err;
 
-  assert (P != NULL);
-  assert (Q != NULL);
-  assert (R != NULL);
-  assert (modulus != NULL);
+  if (P == NULL || Q == NULL || R == NULL || modulus == NULL)
+    return -1;
 
   if ((err = mp_init_multi (&t1, &t2, &x, &y, &z, NULL)) != 0)
     {
diff --git a/lib/nettle/ecc_projective_dbl_point.c 
b/lib/nettle/ecc_projective_dbl_point.c
index 6f73c4e..4128062 100644
--- a/lib/nettle/ecc_projective_dbl_point.c
+++ b/lib/nettle/ecc_projective_dbl_point.c
@@ -41,9 +41,8 @@ ecc_projective_dbl_point (ecc_point * P, ecc_point * R, mpz_t 
a,
   mpz_t t1, m, s;
   int err;
 
-  assert (P != NULL);
-  assert (R != NULL);
-  assert (modulus != NULL);
+   if (P == NULL || R == NULL || modulus == NULL)
+     return -1;
 
   /*
     algorithm used:
diff --git a/lib/nettle/ecc_projective_dbl_point_3.c 
b/lib/nettle/ecc_projective_dbl_point_3.c
index 18f7cb2..e25c612 100644
--- a/lib/nettle/ecc_projective_dbl_point_3.c
+++ b/lib/nettle/ecc_projective_dbl_point_3.c
@@ -46,9 +46,8 @@ ecc_projective_dbl_point (ecc_point * P, ecc_point * R, mpz_t 
a /* a is -3 */,
    mpz_t t1, t2;
    int   err;
 
-   assert(P       != NULL);
-   assert(R       != NULL);
-   assert(modulus != NULL);
+   if (P == NULL || R == NULL || modulus == NULL)
+     return -1;
 
    if ((err = mp_init_multi(&t1, &t2, NULL)) != 0) {
       return err;
diff --git a/lib/nettle/ecc_shared_secret.c b/lib/nettle/ecc_shared_secret.c
index e24c140..46a0793 100644
--- a/lib/nettle/ecc_shared_secret.c
+++ b/lib/nettle/ecc_shared_secret.c
@@ -46,10 +46,8 @@ ecc_shared_secret (ecc_key * private_key, ecc_key * 
public_key,
   ecc_point *result;
   int err;
 
-  assert (private_key != NULL);
-  assert (public_key != NULL);
-  assert (out != NULL);
-  assert (outlen != NULL);
+  if (private_key == NULL || public_key == NULL || out == NULL || outlen == 
NULL)
+    return -1;
 
   /* type valid? */
   if (private_key->type != PK_PRIVATE)
diff --git a/lib/nettle/ecc_sign_hash.c b/lib/nettle/ecc_sign_hash.c
index cc58a23..ab7f943 100644
--- a/lib/nettle/ecc_sign_hash.c
+++ b/lib/nettle/ecc_sign_hash.c
@@ -49,9 +49,8 @@ ecc_sign_hash (const unsigned char *in, unsigned long inlen,
   mpz_t e;
   int err;
 
-  assert (in != NULL);
-  assert (sig != NULL);
-  assert (key != NULL);
+  if (in == NULL || sig == NULL || key == NULL)
+    return -1;
 
   /* is this a private key? */
   if (key->type != PK_PRIVATE)
diff --git a/lib/nettle/ecc_verify_hash.c b/lib/nettle/ecc_verify_hash.c
index 92a996e..b102159 100644
--- a/lib/nettle/ecc_verify_hash.c
+++ b/lib/nettle/ecc_verify_hash.c
@@ -57,10 +57,8 @@ ecc_verify_hash (struct dsa_signature *signature,
   mpz_t v, w, u1, u2, e;
   int err;
 
-  assert (signature != NULL);
-  assert (hash != NULL);
-  assert (stat != NULL);
-  assert (key != NULL);
+  if (signature == NULL || hash == NULL || stat == NULL || key == NULL)
+    return -1;
 
   /* default to invalid signature */
   *stat = 0;
diff --git a/tests/suite/testcompat b/tests/suite/testcompat
index 5f63216..b512231 100755
--- a/tests/suite/testcompat
+++ b/tests/suite/testcompat
@@ -21,6 +21,12 @@
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 if ! test -x /usr/bin/openssl;then
+  echo "You need openssl to run this test"
+  exit 77
+fi
+
+if ! test -x /usr/bin/datefudge;then
+  echo "You need datefudge to run this test"
   exit 77
 fi
 


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]