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_3_0_17-52-gbae30a2


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_17-52-gbae30a2
Date: Sun, 01 Apr 2012 19:48:36 +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=bae30a26a05629c95f72cb57b7cd7e5ec943299b

The branch, master has been updated
       via  bae30a26a05629c95f72cb57b7cd7e5ec943299b (commit)
       via  4e66491e75aebfde7983fe7e2148a3088122dfe2 (commit)
       via  d5a38e87832b025175131828cd38811a618d3be9 (commit)
       via  3fd08b69b27551f05a457be1cf25336bc1abb5d3 (commit)
      from  e5d92cc1b7a98778ed7e606e8e3a54b2363ee200 (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 bae30a26a05629c95f72cb57b7cd7e5ec943299b
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 1 21:15:24 2012 +0200

    updated libtasn1

commit 4e66491e75aebfde7983fe7e2148a3088122dfe2
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 1 08:55:25 2012 +0200

    removed old function.

commit d5a38e87832b025175131828cd38811a618d3be9
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 1 08:55:22 2012 +0200

    bumped versions

commit 3fd08b69b27551f05a457be1cf25336bc1abb5d3
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 1 08:08:35 2012 +0200

    removed function that didn't exist

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

Summary of changes:
 NEWS                            |    2 +
 configure.ac                    |    2 +-
 doc/Makefile.am                 |    1 -
 lib/includes/gnutls/gnutls.h.in |    6 --
 lib/minitasn1/decoding.c        |  145 +++++++++++++++++++++------------------
 m4/hooks.m4                     |    6 +-
 6 files changed, 85 insertions(+), 77 deletions(-)

diff --git a/NEWS b/NEWS
index e035f75..533e812 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ VIA processors. Reported by Kris Karas.
 as GeneralizedTime instead of UTCTime (which only stores
 2 digits of a year).
 
+** minitasn1: Upgraded to libtasn1 version 2.13 (pre-release).
+
 ** API and ABI modifications:
 gnutls_x509_crt_set_private_key_usage_period: Added
 gnutls_x509_crt_get_private_key_usage_period: Added
diff --git a/configure.ac b/configure.ac
index 83c3577..9af1253 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 # USA
 
 AC_PREREQ(2.61)
-AC_INIT([GnuTLS], [3.0.17], address@hidden)
+AC_INIT([GnuTLS], [3.0.18], address@hidden)
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ebbd9c9..ace7359 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -728,7 +728,6 @@ FUNCS += 
functions/gnutls_certificate_set_x509_simple_pkcs12_mem
 FUNCS += functions/gnutls_certificate_set_x509_key
 FUNCS += functions/gnutls_certificate_set_x509_trust
 FUNCS += functions/gnutls_certificate_set_x509_crl
-FUNCS += functions/gnutls_certificate_get_openpgp_keyring
 FUNCS += functions/gnutls_global_init
 FUNCS += functions/gnutls_global_deinit
 FUNCS += functions/gnutls_global_set_mutex
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index f314be8..035f638 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -1147,12 +1147,6 @@ gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t 
session);
                                        gnutls_x509_crl_t * crl_list,
                                        int crl_list_size);
 
-  void
-    gnutls_certificate_get_openpgp_keyring (gnutls_certificate_credentials_t
-                                            sc,
-                                            gnutls_openpgp_keyring_t *
-                                            keyring);
-
 /* global state functions
  */
   int gnutls_global_init (void);
diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c
index 968fa96..1cfad35 100644
--- a/lib/minitasn1/decoding.c
+++ b/lib/minitasn1/decoding.c
@@ -30,6 +30,7 @@
 #include <gstr.h>
 #include "structure.h"
 #include "element.h"
+#include <limits.h>
 
 static asn1_retCode
 _asn1_get_indefinite_length_string (const unsigned char *der, int *len);
@@ -60,8 +61,8 @@ _asn1_error_description_tag_error (ASN1_TYPE node, char 
*ErrorDescription)
 signed long
 asn1_get_length_der (const unsigned char *der, int der_len, int *len)
 {
-  int ans;
-  int k, punt;
+  unsigned int ans, sum, last;
+  unsigned int k, punt;
 
   *len = 0;
   if (der_len <= 0)
@@ -71,7 +72,7 @@ asn1_get_length_der (const unsigned char *der, int der_len, 
int *len)
     {
       /* short form */
       *len = 1;
-      return der[0];
+      ans = der[0];
     }
   else
     {
@@ -83,10 +84,10 @@ asn1_get_length_der (const unsigned char *der, int der_len, 
int *len)
          ans = 0;
          while (punt <= k && punt < der_len)
            {
-             int last = ans;
+             last = ans;
 
-             ans = ans * 256 + der[punt++];
-             if (ans < last)
+             ans = (ans*256) + der[punt++];
+             if (ans < last) 
                /* we wrapped around, no bignum support... */
                return -2;
            }
@@ -98,10 +99,19 @@ asn1_get_length_der (const unsigned char *der, int der_len, 
int *len)
        }
 
       *len = punt;
-      if (ans + *len < ans || ans + *len > der_len)
-       return -4;
-      return ans;
     }
+
+  sum = ans + *len;
+  
+  /* check for overflow as well INT_MAX as a maximum upper
+   * limit for length */
+  if (sum >= INT_MAX || sum < ans)
+    return -2;
+  
+  if (sum > der_len)
+    return -4;
+
+  return ans;
 }
 
 /**
@@ -120,7 +130,8 @@ int
 asn1_get_tag_der (const unsigned char *der, int der_len,
                  unsigned char *cls, int *len, unsigned long *tag)
 {
-  int punt, ris;
+  unsigned int punt, ris;
+  unsigned int last;
 
   if (der == NULL || der_len < 2 || len == NULL)
     return ASN1_DER_ERROR;
@@ -139,21 +150,23 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
       ris = 0;
       while (punt <= der_len && der[punt] & 128)
        {
-         int last = ris;
-         ris = ris * 128 + (der[punt++] & 0x7F);
+         last = ris;
+
+         ris = (ris * 128) + (der[punt++] & 0x7F);
          if (ris < last)
-           /* wrapper around, and no bignums... */
+           /* wrapped around, and no bignums... */
            return ASN1_DER_ERROR;
        }
+
       if (punt >= der_len)
        return ASN1_DER_ERROR;
-      {
-       int last = ris;
-       ris = ris * 128 + (der[punt++] & 0x7F);
-       if (ris < last)
-         /* wrapper around, and no bignums... */
-         return ASN1_DER_ERROR;
-      }
+
+      last = ris;
+        
+      ris = (ris * 128) + (der[punt++] & 0x7F);
+      if (ris < last)
+        return ASN1_DER_ERROR;
+
       *len = punt;
     }
   if (tag)
@@ -1031,10 +1044,10 @@ asn1_der_decoding (ASN1_TYPE * element, const void 
*ider, int len,
              len2 =
                asn1_get_length_der (der + counter, len - counter, &len3);
              if (len2 < 0)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              _asn1_set_value (p, der + counter, len3 + len2);
              counter += len3 + len2;
@@ -1045,7 +1058,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
                _asn1_get_objectid_der (der + counter, len - counter, &len2,
                                        temp, sizeof (temp));
              if (result != ASN1_SUCCESS)
-                goto cleanup;
+               goto cleanup;
 
              tlen = strlen (temp);
              if (tlen > 0)
@@ -1070,7 +1083,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
              len3 = len - counter;
              result = _asn1_get_octet_string (der + counter, p, &len3);
              if (result != ASN1_SUCCESS)
-                goto cleanup;
+               goto cleanup;
 
              counter += len3;
              move = RIGHT;
@@ -1079,10 +1092,10 @@ asn1_der_decoding (ASN1_TYPE * element, const void 
*ider, int len,
              len2 =
                asn1_get_length_der (der + counter, len - counter, &len3);
              if (len2 < 0)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              _asn1_set_value (p, der + counter, len3 + len2);
              counter += len3 + len2;
@@ -1092,10 +1105,10 @@ asn1_der_decoding (ASN1_TYPE * element, const void 
*ider, int len,
              len2 =
                asn1_get_length_der (der + counter, len - counter, &len3);
              if (len2 < 0)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              _asn1_set_value (p, der + counter, len3 + len2);
              counter += len3 + len2;
@@ -1118,10 +1131,10 @@ asn1_der_decoding (ASN1_TYPE * element, const void 
*ider, int len,
                            }
                        }
                      else
-                       {
+                       {
                          result = ASN1_DER_ERROR;
                          goto cleanup;
-                        }
+                       }
                      counter += 2;
                    }
                  else
@@ -1142,7 +1155,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
                    {
                      result = ASN1_DER_ERROR;
                      goto cleanup;
-                    }
+                   }
                  counter += len2;
                  if (len3 > 0)
                    {
@@ -1183,10 +1196,10 @@ asn1_der_decoding (ASN1_TYPE * element, const void 
*ider, int len,
                  if (len2 == -1)
                    {           /* indefinite length method */
                      if ((counter + 2) > len)
-                       {
+                       {
                          result = ASN1_DER_ERROR;
                          goto cleanup;
-                        }
+                       }
 
                      if ((der[counter]) || der[counter + 1])
                        {
@@ -1227,7 +1240,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
                    {
                      result = ASN1_DER_ERROR;
                      goto cleanup;
-                    }
+                   }
                  counter += len2;
                  if (len3)
                    {
@@ -1258,24 +1271,24 @@ asn1_der_decoding (ASN1_TYPE * element, const void 
*ider, int len,
              if (asn1_get_tag_der
                  (der + counter, len - counter, &class, &len2,
                   &tag) != ASN1_SUCCESS)
-                {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              if (counter + len2 > len)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
              len4 =
                asn1_get_length_der (der + counter + len2,
                                     len - counter - len2, &len3);
              if (len4 < -1)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
              if (len4 != -1)
                {
                  len2 += len4;
@@ -1311,7 +1324,7 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
                        {
                          result = ASN1_DER_ERROR;
                          goto cleanup;
-                        }
+                       }
                    }
                }
              move = RIGHT;
@@ -1657,10 +1670,10 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
              len2 =
                asn1_get_length_der (der + counter, len - counter, &len3);
              if (len2 < 0)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              if (state == FOUND)
                {
@@ -1668,7 +1681,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                    {
                      result = ASN1_DER_ERROR;
                      goto cleanup;
-                    }
+                   }
                  _asn1_set_value (p, der + counter, len3 + len2);
 
                  if (p == nodeFound)
@@ -1702,7 +1715,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                    {
                      result = ASN1_DER_ERROR;
                      goto cleanup;
-                    }
+                   }
                  len2 += len3;
                }
 
@@ -1733,7 +1746,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                    {
                      result = ASN1_DER_ERROR;
                      goto cleanup;
-                    }
+                   }
                  len2 += len3;
                }
 
@@ -1761,10 +1774,10 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
              len2 =
                asn1_get_length_der (der + counter, len - counter, &len3);
              if (len2 < 0)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              if (state == FOUND)
                {
@@ -1772,7 +1785,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                    {
                      result = ASN1_DER_ERROR;
                      goto cleanup;
-                    }
+                   }
                  _asn1_set_value (p, der + counter, len3 + len2);
 
                  if (p == nodeFound)
@@ -1785,17 +1798,17 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
              len2 =
                asn1_get_length_der (der + counter, len - counter, &len3);
              if (len2 < 0)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
              if (state == FOUND)
                {
                  if (len3 + len2 > len - counter)
                    {
                      result = ASN1_DER_ERROR;
                      goto cleanup;
-                    }
+                   }
                  _asn1_set_value (p, der + counter, len3 + len2);
 
                  if (p == nodeFound)
@@ -1839,10 +1852,10 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                        asn1_get_length_der (der + counter, len - counter,
                                             &len2);
                      if (len3 < 0)
-                       {
+                       {
                          result = ASN1_DER_ERROR;
                          goto cleanup;
-                        }
+                       }
                      counter += len2 + len3;
                      move = RIGHT;
                    }
@@ -1852,10 +1865,10 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                        asn1_get_length_der (der + counter, len - counter,
                                             &len2);
                      if (len3 < 0)
-                       {
+                       {
                          result = ASN1_DER_ERROR;
                          goto cleanup;
-                        }
+                       }
                      counter += len2;
                      if (len3 > 0)
                        {
@@ -1922,10 +1935,10 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                        asn1_get_length_der (der + counter, len - counter,
                                             &len2);
                      if (len3 < 0)
-                       {
+                       {
                          result = ASN1_DER_ERROR;
                          goto cleanup;
-                        }
+                       }
                      counter += len2 + len3;
                      move = RIGHT;
                    }
@@ -1935,10 +1948,10 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
                        asn1_get_length_der (der + counter, len - counter,
                                             &len2);
                      if (len3 < 0)
-                       {
+                       {
                          result = ASN1_DER_ERROR;
                          goto cleanup;
-                        }
+                       }
                      counter += len2;
                      if (len3)
                        {
@@ -1964,25 +1977,25 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
              if (asn1_get_tag_der
                  (der + counter, len - counter, &class, &len2,
                   &tag) != ASN1_SUCCESS)
-                {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              if (counter + len2 > len)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              len4 =
                asn1_get_length_der (der + counter + len2,
                                     len - counter - len2, &len3);
              if (len4 < -1)
-               {
+               {
                  result = ASN1_DER_ERROR;
                  goto cleanup;
-                }
+               }
 
              if (len4 != -1)
                {
diff --git a/m4/hooks.m4 b/m4/hooks.m4
index ee6ba5a..b1be039 100644
--- a/m4/hooks.m4
+++ b/m4/hooks.m4
@@ -39,9 +39,9 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
   # Interfaces changed/added/removed:   CURRENT++       REVISION=0
   # Interfaces added:                             AGE++
   # Interfaces removed:                           AGE=0
-  AC_SUBST(LT_CURRENT, 35)
-  AC_SUBST(LT_REVISION, 1)
-  AC_SUBST(LT_AGE, 7)
+  AC_SUBST(LT_CURRENT, 36)
+  AC_SUBST(LT_REVISION, 0)
+  AC_SUBST(LT_AGE, 8)
 
   AC_SUBST(LT_SSL_CURRENT, 27)
   AC_SUBST(LT_SSL_REVISION, 2)


hooks/post-receive
-- 
GNU gnutls



reply via email to

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