gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-202-gcb48b3b


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-202-gcb48b3b
Date: Wed, 14 Apr 2010 15:29:54 +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=cb48b3b6dbbf6fc63d1a26fbb52536f8d11c5a6e

The branch, master has been updated
       via  cb48b3b6dbbf6fc63d1a26fbb52536f8d11c5a6e (commit)
       via  89e5f6cfcfb6ad4cbfd18f1c757f5f851819ccb9 (commit)
       via  8cd987e56bdc8d188212e18359756f6e7b6b5918 (commit)
      from  08b0052dae6738cdc619be7ff105682e8d63be32 (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 cb48b3b6dbbf6fc63d1a26fbb52536f8d11c5a6e
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed Apr 14 17:29:19 2010 +0200

    Use size_t instead of int for input variables that represent sizes.

commit 89e5f6cfcfb6ad4cbfd18f1c757f5f851819ccb9
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Apr 2 10:13:15 2010 +0200

    Free the priority structure on error. Reported by Paul Aurich.

commit 8cd987e56bdc8d188212e18359756f6e7b6b5918
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Apr 2 10:10:49 2010 +0200

    The string is colon separated. Reported by Paul Aurich.

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

Summary of changes:
 lib/crypto-api.c             |    9 ++++-----
 lib/gnutls_priority.c        |    8 +++++---
 lib/includes/gnutls/crypto.h |    8 ++++----
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/lib/crypto-api.c b/lib/crypto-api.c
index 453b8c1..bf06fc4 100644
--- a/lib/crypto-api.c
+++ b/lib/crypto-api.c
@@ -74,8 +74,7 @@ gnutls_cipher_init (gnutls_cipher_hd_t * handle,
  *
  * Since: 2.10.0
  **/
-int
-gnutls_cipher_encrypt (gnutls_cipher_hd_t handle, void *text, int textlen)
+int gnutls_cipher_encrypt (gnutls_cipher_hd_t handle, void *text, size_t 
textlen)
 {
   return _gnutls_cipher_encrypt ((cipher_hd_st *) handle, text, textlen);
 }
@@ -95,7 +94,7 @@ gnutls_cipher_encrypt (gnutls_cipher_hd_t handle, void *text, 
int textlen)
  **/
 int
 gnutls_cipher_decrypt (gnutls_cipher_hd_t handle, void *ciphertext,
-                      int ciphertextlen)
+                      size_t ciphertextlen)
 {
   return _gnutls_cipher_decrypt ((cipher_hd_st *) handle, ciphertext,
                                 ciphertextlen);
@@ -138,7 +137,7 @@ gnutls_cipher_deinit (gnutls_cipher_hd_t handle)
 int
 gnutls_hmac_init (gnutls_hmac_hd_t * dig,
                  gnutls_digest_algorithm_t algorithm,
-                 const void *key, int keylen)
+                 const void *key, size_t keylen)
 {
   *dig = gnutls_malloc (sizeof (digest_hd_st));
   if (*dig == NULL)
@@ -235,7 +234,7 @@ gnutls_hmac_get_len (gnutls_mac_algorithm_t algorithm)
  **/
 int
 gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm,
-                 const void *key, int keylen,
+                 const void *key, size_t keylen,
                  const void *text, size_t textlen, void *digest)
 {
   return _gnutls_hmac_fast (algorithm, key, keylen, text, textlen, digest);
diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c
index 39d9ee9..e4cd9e7 100644
--- a/lib/gnutls_priority.c
+++ b/lib/gnutls_priority.c
@@ -472,7 +472,7 @@ gnutls_priority_set (gnutls_session_t session, 
gnutls_priority_t priority)
  * compression methods. This is to avoid using the
  * gnutls_*_priority() functions.
  *
- * The #priorities option allows you to specify a semi-colon
+ * The #priorities option allows you to specify a colon
  * separated list of the cipher priorities to enable.
  *
  * Unless the first keyword is "NONE" the defaults (in preference
@@ -566,7 +566,7 @@ gnutls_priority_init (gnutls_priority_t * priority_cache,
 {
   char *broken_list[MAX_ELEMENTS];
   int broken_list_size, i, j;
-  char *darg;
+  char *darg = NULL;
   int algo;
   rmadd_func *fn;
 
@@ -585,9 +585,10 @@ gnutls_priority_init (gnutls_priority_t * priority_cache,
   if (darg == NULL)
     {
       gnutls_assert ();
-      return GNUTLS_E_MEMORY_ERROR;
+      goto error;
     }
 
+
   break_comma_list (darg, broken_list, &broken_list_size, MAX_ELEMENTS, ':');
   /* This is our default set of protocol version, certificate types and
    * compression methods.
@@ -759,6 +760,7 @@ error:
        }
     }
   gnutls_free (darg);
+  gnutls_free(*priority_cache);
 
   return GNUTLS_E_INVALID_REQUEST;
 
diff --git a/lib/includes/gnutls/crypto.h b/lib/includes/gnutls/crypto.h
index 7e0b65d..4caa322 100644
--- a/lib/includes/gnutls/crypto.h
+++ b/lib/includes/gnutls/crypto.h
@@ -32,9 +32,9 @@ int gnutls_cipher_init (gnutls_cipher_hd_t * handle,
                        const gnutls_datum_t * key,
                        const gnutls_datum_t * iv);
 int gnutls_cipher_encrypt (const gnutls_cipher_hd_t handle,
-                          void *text, int textlen);
+                          void *text, size_t textlen);
 int gnutls_cipher_decrypt (const gnutls_cipher_hd_t handle,
-                          void *ciphertext, int ciphertextlen);
+                          void *ciphertext, size_t ciphertextlen);
 void gnutls_cipher_deinit (gnutls_cipher_hd_t handle);
 int gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm);
 
@@ -44,13 +44,13 @@ typedef struct hmac_hd_st *gnutls_hmac_hd_t;
 
 int gnutls_hmac_init (gnutls_hmac_hd_t * dig,
                      gnutls_digest_algorithm_t algorithm, const void *key,
-                     int keylen);
+                     size_t keylen);
 int gnutls_hmac (gnutls_hmac_hd_t handle, const void *text, size_t textlen);
 void gnutls_hmac_output (gnutls_hmac_hd_t handle, void *digest);
 void gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void *digest);
 int gnutls_hmac_get_len (gnutls_mac_algorithm_t algorithm);
 int gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm, const void *key,
-                     int keylen, const void *text, size_t textlen,
+                     size_t keylen, const void *text, size_t textlen,
                      void *digest);
 
 int gnutls_hash_init (gnutls_hash_hd_t * dig,


hooks/post-receive
-- 
GNU gnutls




reply via email to

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