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-209-gaa6e719


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-209-gaa6e719
Date: Wed, 21 Apr 2010 22:05:49 +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=aa6e719ecfe639563bbf57edcbb7beadc8c85a73

The branch, master has been updated
       via  aa6e719ecfe639563bbf57edcbb7beadc8c85a73 (commit)
       via  50c0a347a98616a0a977d9aa4cce048ede278083 (commit)
       via  742c31198cc4061a13a1dc3f46cc5f9c9be2741d (commit)
      from  d153ee5f4519f27e32c8ef637a1f67539ede4af2 (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 aa6e719ecfe639563bbf57edcbb7beadc8c85a73
Author: Simon Josefsson <address@hidden>
Date:   Thu Apr 22 00:05:43 2010 +0200

    Version 2.9.10.

commit 50c0a347a98616a0a977d9aa4cce048ede278083
Author: Simon Josefsson <address@hidden>
Date:   Wed Apr 21 23:24:09 2010 +0200

    Upgrade to libtasn1 version 2.6.

commit 742c31198cc4061a13a1dc3f46cc5f9c9be2741d
Author: Simon Josefsson <address@hidden>
Date:   Wed Apr 21 23:18:24 2010 +0200

    Update gnulib files.

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

Summary of changes:
 NEWS                          |    4 +-
 gl/Makefile.am                |    2 +-
 gl/m4/gnulib-comp.m4          |   31 +-----
 gl/m4/ioctl.m4                |   38 +++++++
 gl/m4/netdb_h.m4              |   12 +--
 gl/stdbool.in.h               |    3 +
 gl/tests/test-lseek.sh        |    3 +-
 gl/tests/test-select-in.sh    |    3 +-
 gl/tests/test-stdbool.c       |    5 +-
 gl/tests/test-stdint.c        |    1 +
 lib/gl/Makefile.am            |    2 +-
 lib/gl/m4/netdb_h.m4          |   12 +--
 lib/gl/m4/visibility.m4       |   26 ++++-
 lib/gl/stdbool.in.h           |    3 +
 lib/gl/tests/test-stdbool.c   |    5 +-
 lib/gl/tests/test-stdint.c    |    1 +
 lib/gl/tests/test-vasprintf.c |   20 ++++
 lib/minitasn1/Makefile.am     |    2 +-
 lib/minitasn1/coding.c        |    2 +-
 lib/minitasn1/decoding.c      |  124 +++++++---------------
 lib/minitasn1/element.h       |   21 ++++
 lib/minitasn1/gstr.h          |   22 ++++
 lib/minitasn1/libtasn1.h      |  234 +++++++++++++++++++----------------------
 lib/minitasn1/parser_aux.c    |   97 +----------------
 lib/minitasn1/parser_aux.h    |   21 ++++
 lib/minitasn1/structure.h     |   21 ++++
 lib/minitasn1/version.c       |   52 +++++++++
 maint.mk                      |   27 +++--
 28 files changed, 418 insertions(+), 376 deletions(-)
 create mode 100644 gl/m4/ioctl.m4
 create mode 100644 lib/minitasn1/version.c

diff --git a/NEWS b/NEWS
index bf07362..40f4099 100644
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,7 @@ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
               2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
-* Version 2.9.10 (unreleased)
+* Version 2.9.10 (released 2010-04-22)
 
 ** libgnutls: Time verification extended to trusted certificate list.
 Unless new constant GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS flag is
@@ -70,7 +70,7 @@ Reported by and tiny patch from Vitaly Mayatskikh
 <address@hidden> in
 <http://thread.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/4096>.
 
-** minitasn1: Upgraded to libtasn1 version 2.5.
+** minitasn1: Upgraded to libtasn1 version 2.6.
 
 ** i18n: Updated Czech, Dutch, French, Polish, Swedish translation.
 ** Added Italian and Simplified Chinese translation.
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 327ac12..b43e6bb 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -435,7 +435,7 @@ libgnu_la_SOURCES += minmax.h
 
 ## begin gnulib module netdb
 
-BUILT_SOURCES += $(NETDB_H)
+BUILT_SOURCES += netdb.h
 
 # We need the following in order to create <netdb.h> when the system
 # doesn't have one that works with the given compiler.
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 65fb6c6..387c5df 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -475,35 +475,7 @@ changequote([, ])dnl
   gl_FUNC_UNGETC_WORKS
   AC_C_BIGENDIAN
   AC_C_BIGENDIAN
-  AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    dnl Even if the 'socket' module is not used here, another part of the
-    dnl application may use it and pass file descriptors that refer to
-    dnl sockets to the ioctl() function. So enable the support for sockets.
-    AC_LIBOBJ([ioctl])
-    gl_REPLACE_SYS_IOCTL_H
-  else
-    AC_CHECK_FUNCS([ioctl])
-    dnl On glibc systems, the second parameter is 'unsigned long int request',
-    dnl not 'int request'. We cannot simply cast the function pointer, but
-    dnl instead need a wrapper.
-    AC_CACHE_CHECK([for ioctl with POSIX signature],
-      [gl_cv_func_ioctl_posix_signature],
-      [AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM(
-            [[#include <sys/ioctl.h>]],
-            [[extern int ioctl (int, int, ...);]])
-         ],
-         [gl_cv_func_ioctl_posix_signature=yes],
-         [gl_cv_func_ioctl_posix_signature=no])
-      ])
-    if test $gl_cv_func_ioctl_posix_signature != yes; then
-      REPLACE_IOCTL=1
-      AC_LIBOBJ([ioctl])
-      gl_REPLACE_SYS_IOCTL_H
-    fi
-  fi
+  gl_FUNC_IOCTL
   gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
   AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
   gt_TYPE_WCHAR_T
@@ -733,6 +705,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/inet_pton.m4
   m4/intmax_t.m4
   m4/inttypes_h.m4
+  m4/ioctl.m4
   m4/lib-ld.m4
   m4/lib-link.m4
   m4/lib-prefix.m4
diff --git a/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4
new file mode 100644
index 0000000..4a0a99f
--- /dev/null
+++ b/gl/m4/ioctl.m4
@@ -0,0 +1,38 @@
+# ioctl.m4 serial 1
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_IOCTL],
+[
+  AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    dnl Even if the 'socket' module is not used here, another part of the
+    dnl application may use it and pass file descriptors that refer to
+    dnl sockets to the ioctl() function. So enable the support for sockets.
+    AC_LIBOBJ([ioctl])
+    gl_REPLACE_SYS_IOCTL_H
+  else
+    AC_CHECK_FUNCS([ioctl])
+    dnl On glibc systems, the second parameter is 'unsigned long int request',
+    dnl not 'int request'. We cannot simply cast the function pointer, but
+    dnl instead need a wrapper.
+    AC_CACHE_CHECK([for ioctl with POSIX signature],
+      [gl_cv_func_ioctl_posix_signature],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <sys/ioctl.h>]],
+            [[extern int ioctl (int, int, ...);]])
+         ],
+         [gl_cv_func_ioctl_posix_signature=yes],
+         [gl_cv_func_ioctl_posix_signature=no])
+      ])
+    if test $gl_cv_func_ioctl_posix_signature != yes; then
+      REPLACE_IOCTL=1
+      AC_LIBOBJ([ioctl])
+      gl_REPLACE_SYS_IOCTL_H
+    fi
+  fi
+])
diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4
index 40ba8f6..e04a2d1 100644
--- a/gl/m4/netdb_h.m4
+++ b/gl/m4/netdb_h.m4
@@ -1,4 +1,4 @@
-# netdb_h.m4 serial 7
+# netdb_h.m4 serial 8
 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,21 +10,11 @@ AC_DEFUN([gl_HEADER_NETDB],
   AC_CHECK_HEADERS_ONCE([netdb.h])
   gl_CHECK_NEXT_HEADERS([netdb.h])
   if test $ac_cv_header_netdb_h = yes; then
-    AC_COMPILE_IFELSE(
-      [AC_LANG_PROGRAM([[
-         #include <netdb.h>
-         struct addrinfo a;
-         int b = EAI_OVERFLOW;
-         int c = AI_NUMERICSERV;
-       ]])],
-      [NETDB_H=''], [NETDB_H='netdb.h'])
     HAVE_NETDB_H=1
   else
-    NETDB_H='netdb.h'
     HAVE_NETDB_H=0
   fi
   AC_SUBST([HAVE_NETDB_H])
-  AC_SUBST([NETDB_H])
 ])
 
 AC_DEFUN([gl_NETDB_MODULE_INDICATOR],
diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h
index e2312ec..574c281 100644
--- a/gl/stdbool.in.h
+++ b/gl/stdbool.in.h
@@ -50,6 +50,9 @@
          with this substitute.  With this substitute, only the values 0 and 1
          give the expected result when converted to _Bool' or 'bool'.
 
+       - C99 allows the use of (_Bool)0.0 in constant expressions, but
+         this substitute cannot always provide this property.
+
    Also, it is suggested that programs use 'bool' rather than '_Bool';
    this isn't required, but 'bool' is more common.  */
 
diff --git a/gl/tests/test-lseek.sh b/gl/tests/test-lseek.sh
index ae3b23e..d5cc093 100755
--- a/gl/tests/test-lseek.sh
+++ b/gl/tests/test-lseek.sh
@@ -8,7 +8,8 @@ tmpfiles=t-lseek.tmp
 ./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
 
 # pipes
-echo hi | ./test-lseek${EXEEXT} 1 | cat || exit 1
+: | { ./test-lseek${EXEEXT} 1; echo $? > t-lseek.tmp; } | :
+test "x`cat t-lseek.tmp`" = x0 || exit 1
 
 # closed descriptors
 # Doesn't work under mingw -- address@hidden
diff --git a/gl/tests/test-select-in.sh b/gl/tests/test-select-in.sh
index fdeb01c..2a8b742 100755
--- a/gl/tests/test-select-in.sh
+++ b/gl/tests/test-select-in.sh
@@ -18,7 +18,8 @@ test `cat t-select-in.tmp` = "1" || exit 1
 # Pipes.
 
 rm -f t-select-in.tmp
-{ sleep 1; echo abc; } | ./test-select-fd${EXEEXT} r 0 t-select-in.tmp
+{ sleep 1; echo abc; } | \
+  { ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; }
 test `cat t-select-in.tmp` = "0" || exit 1
 
 rm -f t-select-in.tmp
diff --git a/gl/tests/test-stdbool.c b/gl/tests/test-stdbool.c
index 560e0e5..fcb534d 100644
--- a/gl/tests/test-stdbool.c
+++ b/gl/tests/test-stdbool.c
@@ -46,11 +46,12 @@ struct s { _Bool s: 1; _Bool t; } s;
 char a[true == 1 ? 1 : -1];
 char b[false == 0 ? 1 : -1];
 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-#if 0 /* Cannot be guaranteed with gnulib's <stdbool.h>.  */
+#if 0 /* Cannot be guaranteed with gnulib's <stdbool.h>, at least,
+not for all compilers.  */
 char d[(bool) 0.5 == true ? 1 : -1];
 bool e = &s;
-#endif
 char f[(_Bool) 0.0 == false ? 1 : -1];
+#endif
 char g[true];
 char h[sizeof (_Bool)];
 #if 0 /* See above.  */
diff --git a/gl/tests/test-stdint.c b/gl/tests/test-stdint.c
index 9cec2e2..d64057a 100644
--- a/gl/tests/test-stdint.c
+++ b/gl/tests/test-stdint.c
@@ -22,6 +22,7 @@
 #define DO_PEDANTIC 0
 
 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* likewise */
 #include <stdint.h>
 
 #include "verify.h"
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 3944512..e0ba4eb 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -265,7 +265,7 @@ liblgnu_la_SOURCES += minmax.h
 
 ## begin gnulib module netdb
 
-BUILT_SOURCES += $(NETDB_H)
+BUILT_SOURCES += netdb.h
 
 # We need the following in order to create <netdb.h> when the system
 # doesn't have one that works with the given compiler.
diff --git a/lib/gl/m4/netdb_h.m4 b/lib/gl/m4/netdb_h.m4
index 40ba8f6..e04a2d1 100644
--- a/lib/gl/m4/netdb_h.m4
+++ b/lib/gl/m4/netdb_h.m4
@@ -1,4 +1,4 @@
-# netdb_h.m4 serial 7
+# netdb_h.m4 serial 8
 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,21 +10,11 @@ AC_DEFUN([gl_HEADER_NETDB],
   AC_CHECK_HEADERS_ONCE([netdb.h])
   gl_CHECK_NEXT_HEADERS([netdb.h])
   if test $ac_cv_header_netdb_h = yes; then
-    AC_COMPILE_IFELSE(
-      [AC_LANG_PROGRAM([[
-         #include <netdb.h>
-         struct addrinfo a;
-         int b = EAI_OVERFLOW;
-         int c = AI_NUMERICSERV;
-       ]])],
-      [NETDB_H=''], [NETDB_H='netdb.h'])
     HAVE_NETDB_H=1
   else
-    NETDB_H='netdb.h'
     HAVE_NETDB_H=0
   fi
   AC_SUBST([HAVE_NETDB_H])
-  AC_SUBST([NETDB_H])
 ])
 
 AC_DEFUN([gl_NETDB_MODULE_INDICATOR],
diff --git a/lib/gl/m4/visibility.m4 b/lib/gl/m4/visibility.m4
index 6d3f9c9..077c476 100644
--- a/lib/gl/m4/visibility.m4
+++ b/lib/gl/m4/visibility.m4
@@ -1,4 +1,4 @@
-# visibility.m4 serial 2 (gettext-0.18)
+# visibility.m4 serial 3 (gettext-0.18)
 dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -26,15 +26,37 @@ AC_DEFUN([gl_VISIBILITY],
   CFLAG_VISIBILITY=
   HAVE_VISIBILITY=0
   if test -n "$GCC"; then
+    dnl First, check whether -Werror can be added to the command line, or
+    dnl whether it leads to an error because of some other option that the
+    dnl user has put into $CC $CFLAGS $CPPFLAGS.
+    AC_MSG_CHECKING([whether the -Werror option is usable])
+    AC_CACHE_VAL([gl_cv_cc_vis_werror], [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -Werror"
+      AC_TRY_COMPILE([], [],
+        [gl_cv_cc_vis_werror=yes],
+        [gl_cv_cc_vis_werror=no])
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_vis_werror])
+    dnl Now check whether visibility declarations are supported.
     AC_MSG_CHECKING([for simple visibility declarations])
     AC_CACHE_VAL([gl_cv_cc_visibility], [
       gl_save_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -fvisibility=hidden"
+      dnl We use the option -Werror and a function dummyfunc, because on some
+      dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+      dnl "visibility attribute not supported in this configuration; ignored"
+      dnl at the first function definition in every compilation unit, and we
+      dnl don't want to use the option in this case.
+      if test $gl_cv_cc_vis_werror = yes; then
+        CFLAGS="$CFLAGS -Werror"
+      fi
       AC_TRY_COMPILE(
         [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
          extern __attribute__((__visibility__("default"))) int exportedvar;
          extern __attribute__((__visibility__("hidden"))) int hiddenfunc 
(void);
-         extern __attribute__((__visibility__("default"))) int exportedfunc 
(void);],
+         extern __attribute__((__visibility__("default"))) int exportedfunc 
(void);
+         void dummyfunc (void) {}],
         [],
         [gl_cv_cc_visibility=yes],
         [gl_cv_cc_visibility=no])
diff --git a/lib/gl/stdbool.in.h b/lib/gl/stdbool.in.h
index 7db57b2..88b3520 100644
--- a/lib/gl/stdbool.in.h
+++ b/lib/gl/stdbool.in.h
@@ -50,6 +50,9 @@
          with this substitute.  With this substitute, only the values 0 and 1
          give the expected result when converted to _Bool' or 'bool'.
 
+       - C99 allows the use of (_Bool)0.0 in constant expressions, but
+         this substitute cannot always provide this property.
+
    Also, it is suggested that programs use 'bool' rather than '_Bool';
    this isn't required, but 'bool' is more common.  */
 
diff --git a/lib/gl/tests/test-stdbool.c b/lib/gl/tests/test-stdbool.c
index 560e0e5..fcb534d 100644
--- a/lib/gl/tests/test-stdbool.c
+++ b/lib/gl/tests/test-stdbool.c
@@ -46,11 +46,12 @@ struct s { _Bool s: 1; _Bool t; } s;
 char a[true == 1 ? 1 : -1];
 char b[false == 0 ? 1 : -1];
 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-#if 0 /* Cannot be guaranteed with gnulib's <stdbool.h>.  */
+#if 0 /* Cannot be guaranteed with gnulib's <stdbool.h>, at least,
+not for all compilers.  */
 char d[(bool) 0.5 == true ? 1 : -1];
 bool e = &s;
-#endif
 char f[(_Bool) 0.0 == false ? 1 : -1];
+#endif
 char g[true];
 char h[sizeof (_Bool)];
 #if 0 /* See above.  */
diff --git a/lib/gl/tests/test-stdint.c b/lib/gl/tests/test-stdint.c
index 9cec2e2..d64057a 100644
--- a/lib/gl/tests/test-stdint.c
+++ b/lib/gl/tests/test-stdint.c
@@ -22,6 +22,7 @@
 #define DO_PEDANTIC 0
 
 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* likewise */
 #include <stdint.h>
 
 #include "verify.h"
diff --git a/lib/gl/tests/test-vasprintf.c b/lib/gl/tests/test-vasprintf.c
index e5dc3cd..e5676f4 100644
--- a/lib/gl/tests/test-vasprintf.c
+++ b/lib/gl/tests/test-vasprintf.c
@@ -56,6 +56,16 @@ test_vasprintf ()
       ASSERT (strcmp (result, "12345") == 0);
       free (result);
     }
+
+  for (repeat = 0; repeat <= 8; repeat++)
+    {
+      char *result;
+      int retval = my_asprintf (&result, "%08lx", 12345);
+      ASSERT (retval == 8);
+      ASSERT (result != NULL);
+      ASSERT (strcmp (result, "00003039") == 0);
+      free (result);
+    }
 }
 
 static void
@@ -72,6 +82,16 @@ test_asprintf ()
       ASSERT (strcmp (result, "12345") == 0);
       free (result);
     }
+
+  for (repeat = 0; repeat <= 8; repeat++)
+    {
+      char *result;
+      int retval = asprintf (&result, "%08lx", 12345);
+      ASSERT (retval == 8);
+      ASSERT (result != NULL);
+      ASSERT (strcmp (result, "00003039") == 0);
+      free (result);
+    }
 }
 
 int
diff --git a/lib/minitasn1/Makefile.am b/lib/minitasn1/Makefile.am
index 9490d82..2d43be2 100644
--- a/lib/minitasn1/Makefile.am
+++ b/lib/minitasn1/Makefile.am
@@ -30,4 +30,4 @@ noinst_LTLIBRARIES = libminitasn1.la
 
 libminitasn1_la_SOURCES = libtasn1.h gstr.h int.h parser_aux.h         \
         structure.h element.h decoding.c gstr.c errors.c parser_aux.c  \
-        structure.c element.c coding.c
+        structure.c element.c coding.c version.c
diff --git a/lib/minitasn1/coding.c b/lib/minitasn1/coding.c
index 9a28b12..31b5ebb 100644
--- a/lib/minitasn1/coding.c
+++ b/lib/minitasn1/coding.c
@@ -384,7 +384,7 @@ _asn1_complete_explicit_tag (ASN1_TYPE node, unsigned char 
*der,
       p = node->down;
       /* When there are nested tags we must complete them reverse to
          the order they were created. This is because completing a tag
-         modifies all data within it, including the incomplete tags 
+         modifies all data within it, including the incomplete tags
          which store buffer positions -- address@hidden 2002-09-06
        */
       while (p->right)
diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c
index 648911a..8c8b01f 100644
--- a/lib/minitasn1/decoding.c
+++ b/lib/minitasn1/decoding.c
@@ -54,7 +54,7 @@ _asn1_error_description_tag_error (ASN1_TYPE node, char 
*ErrorDescription)
  *
  * Extract a length field from DER data.
  *
- * Return value: Return the decoded length value, or -1 on indefinite
+ * Returns: Return the decoded length value, or -1 on indefinite
  *   length, or -2 when the value was too big.
  **/
 signed long
@@ -101,7 +101,6 @@ asn1_get_length_der (const unsigned char *der, int der_len, 
int *len)
     }
 }
 
-
 /**
  * asn1_get_tag_der:
  * @der: DER data to decode.
@@ -112,7 +111,7 @@ asn1_get_length_der (const unsigned char *der, int der_len, 
int *len)
  *
  * Decode the class and TAG from DER code.
  *
- * Return value: Returns %ASN1_SUCCESS on success, or an error.
+ * Returns: Returns %ASN1_SUCCESS on success, or an error.
  **/
 int
 asn1_get_tag_der (const unsigned char *der, int der_len,
@@ -169,8 +168,8 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
  * asn1_get_length_der() is that this function will return a length
  * even if the value has indefinite encoding.
  *
- * Return value: Return the decoded length value, or negative value
- *   when the value was too big.
+ * Returns: Return the decoded length value, or negative value when
+ *   the value was too big.
  *
  * Since: 2.0
  **/
@@ -203,7 +202,7 @@ asn1_get_length_ber (const unsigned char *ber, int ber_len, 
int *len)
  *
  * Extract an OCTET SEQUENCE from DER data.
  *
- * Return value: Returns %ASN1_SUCCESS on success, or an error.
+ * Returns: Returns %ASN1_SUCCESS on success, or an error.
  **/
 int
 asn1_get_octet_der (const unsigned char *der, int der_len,
@@ -232,8 +231,6 @@ asn1_get_octet_der (const unsigned char *der, int der_len,
   return ASN1_SUCCESS;
 }
 
-
-
 /* Returns ASN1_SUCCESS on success or an error code on error.
  */
 static int
@@ -254,8 +251,6 @@ _asn1_get_time_der (const unsigned char *der, int der_len, 
int *ret_len,
   return ASN1_SUCCESS;
 }
 
-
-
 static int
 _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len,
                        char *str, int str_size)
@@ -288,8 +283,6 @@ _asn1_get_objectid_der (const unsigned char *der, int 
der_len, int *ret_len,
   leading = 1;
   for (k = 1; k < len; k++)
     {
-
-
       /* X.690 mandates that the leading byte must never be 0x80
        */
       if (leading != 0 && der[len_len + k] == 0x80)
@@ -330,7 +323,7 @@ _asn1_get_objectid_der (const unsigned char *der, int 
der_len, int *ret_len,
  *
  * Extract a BIT SEQUENCE from DER data.
  *
- * Return value: Return %ASN1_SUCCESS on success, or an error.
+ * Returns: Return %ASN1_SUCCESS on success, or an error.
  **/
 int
 asn1_get_bit_der (const unsigned char *der, int der_len,
@@ -358,9 +351,6 @@ asn1_get_bit_der (const unsigned char *der, int der_len,
   return ASN1_SUCCESS;
 }
 
-
-
-
 static int
 _asn1_extract_tag_der (ASN1_TYPE node, const unsigned char *der, int der_len,
                       int *ret_len)
@@ -559,7 +549,6 @@ _asn1_extract_tag_der (ASN1_TYPE node, const unsigned char 
*der, int der_len,
   return ASN1_SUCCESS;
 }
 
-
 static int
 _asn1_delete_not_used (ASN1_TYPE node)
 {
@@ -664,7 +653,6 @@ _asn1_extract_der_octet (ASN1_TYPE node, const unsigned 
char *der,
   return ASN1_SUCCESS;
 }
 
-
 static asn1_retCode
 _asn1_get_octet_string (const unsigned char *der, ASN1_TYPE node, int *len)
 {
@@ -798,7 +786,6 @@ _asn1_get_indefinite_length_string (const unsigned char 
*der, int *len)
 
 }
 
-
 /**
  * asn1_der_decoding:
  * @element: pointer to an ASN1 structure.
@@ -807,20 +794,16 @@ _asn1_get_indefinite_length_string (const unsigned char 
*der, int *len)
  * @errorDescription: null-terminated string contains details when an
  *   error occurred.
  *
- * Fill the structure *ELEMENT with values of a DER encoding
+ * Fill the structure address@hidden with values of a DER encoding
  * string. The structure must just be created with function
- * 'asn1_create_element'.  If an error occurs during the decoding
- * procedure, the *ELEMENT is deleted and set equal to
+ * asn1_create_element().  If an error occurs during the decoding
+ * procedure, the address@hidden is deleted and set equal to
  * %ASN1_TYPE_EMPTY.
  *
- * Returns:
- *
- *   %ASN1_SUCCESS: DER encoding OK.
- *
- *   %ASN1_ELEMENT_NOT_FOUND: ELEMENT is ASN1_TYPE_EMPTY.
- *
- *   %ASN1_TAG_ERROR,ASN1_DER_ERROR: The der encoding doesn't match
- *     the structure NAME. *ELEMENT deleted.
+ * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND
+ *   if @ELEMENT is %ASN1_TYPE_EMPTY, and %ASN1_TAG_ERROR or
+ *   %ASN1_DER_ERROR if the der encoding doesn't match the structure
+ *   name (address@hidden deleted).
  **/
 asn1_retCode
 asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len,
@@ -1350,7 +1333,6 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, 
int len,
   return ASN1_SUCCESS;
 }
 
-
 #define FOUND        1
 #define SAME_BRANCH  2
 #define OTHER_BRANCH 3
@@ -1365,22 +1347,17 @@ asn1_der_decoding (ASN1_TYPE * element, const void 
*ider, int len,
  * @errorDescription: null-terminated string contains details when an
  *   error occurred.
  *
- * Fill the element named ELEMENTNAME with values of a DER encoding
+ * Fill the element named @ELEMENTNAME with values of a DER encoding
  * string.  The structure must just be created with function
- * 'asn1_create_element'.  The DER vector must contain the encoding
- * string of the whole STRUCTURE.  If an error occurs during the
- * decoding procedure, the *STRUCTURE is deleted and set equal to
+ * asn1_create_element().  The DER vector must contain the encoding
+ * string of the whole @STRUCTURE.  If an error occurs during the
+ * decoding procedure, the address@hidden is deleted and set equal to
  * %ASN1_TYPE_EMPTY.
  *
- * Returns:
- *
- *   %ASN1_SUCCESS: DER encoding OK.
- *
- *   %ASN1_ELEMENT_NOT_FOUND: ELEMENT is ASN1_TYPE_EMPTY or
- *     elementName == NULL.
- *
- *   %ASN1_TAG_ERROR,ASN1_DER_ERROR: The der encoding doesn't match
- *   the structure STRUCTURE. *ELEMENT deleted.
+ * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND
+ *   if ELEMENT is %ASN1_TYPE_EMPTY or @elementName == NULL, and
+ *   %ASN1_TAG_ERROR or %ASN1_DER_ERROR if the der encoding doesn't
+ *   match the structure @structure (*ELEMENT deleted).
  **/
 asn1_retCode
 asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName,
@@ -2127,8 +2104,6 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
   return ASN1_SUCCESS;
 }
 
-
-
 /**
  * asn1_der_decoding_startEnd:
  * @element: pointer to an ASN1 element
@@ -2142,21 +2117,17 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const 
char *elementName,
  *
  * Find the start and end point of an element in a DER encoding
  * string. I mean that if you have a der encoding and you have already
- * used the function "asn1_der_decoding" to fill a structure, it may
+ * used the function asn1_der_decoding() to fill a structure, it may
  * happen that you want to find the piece of string concerning an
  * element of the structure.
  *
- * Example: the sequence "tbsCertificate" inside an X509 certificate.
- *
- * Returns:
+ * One example is the sequence "tbsCertificate" inside an X509
+ * certificate.
  *
- *   %ASN1_SUCCESS: DER encoding OK.
- *
- *   %ASN1_ELEMENT_NOT_FOUND: ELEMENT is ASN1_TYPE EMPTY or
- *   NAME_ELEMENT is not a valid element.
- *
- *   %ASN1_TAG_ERROR,ASN1_DER_ERROR: the der encoding doesn't match
- *   the structure ELEMENT.
+ * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND
+ *   if ELEMENT is %ASN1_TYPE EMPTY or @name_element is not a valid
+ *   element, %ASN1_TAG_ERROR or %ASN1_DER_ERROR if the der encoding
+ *   doesn't match the structure ELEMENT.
  **/
 asn1_retCode
 asn1_der_decoding_startEnd (ASN1_TYPE element, const void *ider, int len,
@@ -2479,7 +2450,6 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const void 
*ider, int len,
   return ASN1_ELEMENT_NOT_FOUND;
 }
 
-
 /**
  * asn1_expand_any_defined_by:
  * @definitions: ASN1 definitions
@@ -2491,14 +2461,10 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const 
void *ider, int len,
  * expand the element ANY is the first one following the definition of
  * the actual value of the OBJECT IDENTIFIER.
  *
- * Returns:
- *
- *   %ASN1_SUCCESS: Substitution OK.
- *
- *   %ASN1_ERROR_TYPE_ANY: Some "ANY DEFINED BY" element couldn't be
- *   expanded due to a problem in OBJECT_ID -> TYPE association.
- *
- *   other errors: Result of der decoding process.
+ * Returns: %ASN1_SUCCESS if Substitution OK, %ASN1_ERROR_TYPE_ANY if
+ *   some "ANY DEFINED BY" element couldn't be expanded due to a
+ *   problem in OBJECT_ID -> TYPE association, or other error codes
+ *   depending on DER decoding.
  **/
 asn1_retCode
 asn1_expand_any_defined_by (ASN1_TYPE definitions, ASN1_TYPE * element)
@@ -2599,7 +2565,7 @@ asn1_expand_any_defined_by (ASN1_TYPE definitions, 
ASN1_TYPE * element)
                      if ((result == ASN1_SUCCESS)
                          && (!strcmp (p3->value, value)))
                        {
-                         p2 = p2->right;       /* pointer to the structure to 
+                         p2 = p2->right;       /* pointer to the structure to
                                                   use for expansion */
                          while ((p2) && (p2->type & CONST_ASSIGN))
                            p2 = p2->right;
@@ -2712,8 +2678,6 @@ asn1_expand_any_defined_by (ASN1_TYPE definitions, 
ASN1_TYPE * element)
   return retCode;
 }
 
-
-
 /**
  * asn1_expand_octet_string:
  * @definitions: ASN1 definitions
@@ -2723,20 +2687,14 @@ asn1_expand_any_defined_by (ASN1_TYPE definitions, 
ASN1_TYPE * element)
  *    the type for expansion.
  *
  * Expands an "OCTET STRING" element of a structure created from a DER
- * decoding process (asn1_der_decoding function). The type used for
- * expansion is the first one following the definition of the actual
- * value of the OBJECT IDENTIFIER indicated by OBJECTNAME.
- *
- * Returns:
- *
- *   %ASN1_SUCCESS: Substitution OK.
- *
- *   %ASN1_ELEMENT_NOT_FOUND: @objectName or @octetName are not correct.
- *
- *   %ASN1_VALUE_NOT_VALID: Wasn't possible to find the type to use
- *       for expansion.
+ * decoding process (the asn1_der_decoding() function).  The type used
+ * for expansion is the first one following the definition of the
+ * actual value of the OBJECT IDENTIFIER indicated by OBJECTNAME.
  *
- *   other errors: result of der decoding process.
+ * Returns: %ASN1_SUCCESS if substitution OK, %ASN1_ELEMENT_NOT_FOUND
+ *   if @objectName or @octetName are not correct,
+ *   %ASN1_VALUE_NOT_VALID if it wasn't possible to find the type to
+ *   use for expansion, or other errors depending on DER decoding.
  **/
 asn1_retCode
 asn1_expand_octet_string (ASN1_TYPE definitions, ASN1_TYPE * element,
@@ -2789,7 +2747,7 @@ asn1_expand_octet_string (ASN1_TYPE definitions, 
ASN1_TYPE * element,
              && (!strcmp (objectNode->value, value)))
            {
 
-             p2 = p2->right;   /* pointer to the structure to 
+             p2 = p2->right;   /* pointer to the structure to
                                   use for expansion */
              while ((p2) && (p2->type & CONST_ASSIGN))
                p2 = p2->right;
diff --git a/lib/minitasn1/element.h b/lib/minitasn1/element.h
index b5d9eb9..95c382a 100644
--- a/lib/minitasn1/element.h
+++ b/lib/minitasn1/element.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010
+ * Free Software Foundation, Inc.
+ *
+ * This file is part of LIBTASN1.
+ *
+ * The LIBTASN1 library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ */
 
 #ifndef _ELEMENT_H
 #define _ELEMENT_H
diff --git a/lib/minitasn1/gstr.h b/lib/minitasn1/gstr.h
index 5452fa4..bffb912 100644
--- a/lib/minitasn1/gstr.h
+++ b/lib/minitasn1/gstr.h
@@ -1,3 +1,25 @@
+/*
+ * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Free Software
+ * Foundation, Inc.
+ *
+ * This file is part of LIBTASN1.
+ *
+ * The LIBTASN1 library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ */
+
 void _asn1_str_cpy (char *dest, size_t dest_tot_size, const char *src);
 void _asn1_str_cat (char *dest, size_t dest_tot_size, const char *src);
 
diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h
index fea5cea..fd3a139 100644
--- a/lib/minitasn1/libtasn1.h
+++ b/lib/minitasn1/libtasn1.h
@@ -45,7 +45,7 @@ extern "C"
 {
 #endif
 
-#define ASN1_VERSION "2.5"
+#define ASN1_VERSION "2.6"
 
   typedef int asn1_retCode;    /* type returned by libtasn1 functions */
 
@@ -159,138 +159,126 @@ extern "C"
   /*  Functions definitions          */
   /***********************************/
 
-  ASN1_API asn1_retCode
-  asn1_parser2tree (const char *file_name,
-                   ASN1_TYPE * definitions,
-                   char *errorDescription);
-
-  ASN1_API asn1_retCode
-  asn1_parser2array (const char *inputFileName,
-                    const char *outputFileName,
-                    const char *vectorName,
-                    char *errorDescription);
-
-  ASN1_API asn1_retCode
-  asn1_array2tree (const ASN1_ARRAY_TYPE * array,
-                  ASN1_TYPE * definitions,
-                  char *errorDescription);
-
-  ASN1_API void
-  asn1_print_structure (FILE * out, ASN1_TYPE structure,
-                       const char *name, int mode);
-
-  ASN1_API asn1_retCode
-  asn1_create_element (ASN1_TYPE definitions,
-                      const char *source_name,
-                      ASN1_TYPE * element);
-
-  ASN1_API asn1_retCode
-  asn1_delete_structure (ASN1_TYPE * structure);
-
-  ASN1_API asn1_retCode
-  asn1_delete_element (ASN1_TYPE structure,
-                      const char *element_name);
-
-  ASN1_API asn1_retCode
-  asn1_write_value (ASN1_TYPE node_root, const char *name,
-                   const void *ivalue, int len);
-
-  ASN1_API asn1_retCode
-  asn1_read_value (ASN1_TYPE root, const char *name,
-                  void *ivalue, int *len);
-
-  ASN1_API asn1_retCode
-  asn1_number_of_elements (ASN1_TYPE element, const char *name, int *num);
-
-  ASN1_API asn1_retCode
-  asn1_der_coding (ASN1_TYPE element, const char *name,
-                  void *ider, int *len,
-                  char *ErrorDescription);
-
-  ASN1_API asn1_retCode
-  asn1_der_decoding (ASN1_TYPE * element, const void *ider,
-                    int len, char *errorDescription);
-
-  ASN1_API asn1_retCode
-  asn1_der_decoding_element (ASN1_TYPE * structure,
-                            const char *elementName,
-                            const void *ider, int len,
-                            char *errorDescription);
-
-  ASN1_API asn1_retCode
-  asn1_der_decoding_startEnd (ASN1_TYPE element,
-                             const void *ider, int len,
-                             const char *name_element,
-                             int *start, int *end);
-
-  ASN1_API asn1_retCode
-  asn1_expand_any_defined_by (ASN1_TYPE definitions,
-                             ASN1_TYPE * element);
-
-  ASN1_API asn1_retCode
-  asn1_expand_octet_string (ASN1_TYPE definitions,
-                           ASN1_TYPE * element,
-                           const char *octetName,
-                           const char *objectName);
-
-  ASN1_API asn1_retCode
-  asn1_read_tag (ASN1_TYPE root, const char *name,
-                int *tagValue, int *classValue);
-
-  ASN1_API const char *
-  asn1_find_structure_from_oid (ASN1_TYPE definitions,
-                               const char *oidValue);
-
-  ASN1_API const char *
-  asn1_check_version (const char *req_version);
-
-  ASN1_API const char *
-  asn1_strerror (asn1_retCode error);
-
-  ASN1_API void
-  asn1_perror (asn1_retCode error);
+  extern ASN1_API asn1_retCode
+    asn1_parser2tree (const char *file_name,
+                     ASN1_TYPE * definitions, char *errorDescription);
+
+  extern ASN1_API asn1_retCode
+    asn1_parser2array (const char *inputFileName,
+                      const char *outputFileName,
+                      const char *vectorName, char *errorDescription);
+
+  extern ASN1_API asn1_retCode
+    asn1_array2tree (const ASN1_ARRAY_TYPE * array,
+                    ASN1_TYPE * definitions, char *errorDescription);
+
+  extern ASN1_API void
+    asn1_print_structure (FILE * out, ASN1_TYPE structure,
+                         const char *name, int mode);
+
+  extern ASN1_API asn1_retCode
+    asn1_create_element (ASN1_TYPE definitions,
+                        const char *source_name, ASN1_TYPE * element);
+
+  extern ASN1_API asn1_retCode asn1_delete_structure (ASN1_TYPE * structure);
+
+  extern ASN1_API asn1_retCode
+    asn1_delete_element (ASN1_TYPE structure, const char *element_name);
+
+  extern ASN1_API asn1_retCode
+    asn1_write_value (ASN1_TYPE node_root, const char *name,
+                     const void *ivalue, int len);
+
+  extern ASN1_API asn1_retCode
+    asn1_read_value (ASN1_TYPE root, const char *name,
+                    void *ivalue, int *len);
+
+  extern ASN1_API asn1_retCode
+    asn1_number_of_elements (ASN1_TYPE element, const char *name, int *num);
+
+  extern ASN1_API asn1_retCode
+    asn1_der_coding (ASN1_TYPE element, const char *name,
+                    void *ider, int *len, char *ErrorDescription);
+
+  extern ASN1_API asn1_retCode
+    asn1_der_decoding (ASN1_TYPE * element, const void *ider,
+                      int len, char *errorDescription);
+
+  extern ASN1_API asn1_retCode
+    asn1_der_decoding_element (ASN1_TYPE * structure,
+                              const char *elementName,
+                              const void *ider, int len,
+                              char *errorDescription);
+
+  extern ASN1_API asn1_retCode
+    asn1_der_decoding_startEnd (ASN1_TYPE element,
+                               const void *ider, int len,
+                               const char *name_element,
+                               int *start, int *end);
+
+  extern ASN1_API asn1_retCode
+    asn1_expand_any_defined_by (ASN1_TYPE definitions, ASN1_TYPE * element);
+
+  extern ASN1_API asn1_retCode
+    asn1_expand_octet_string (ASN1_TYPE definitions,
+                             ASN1_TYPE * element,
+                             const char *octetName, const char *objectName);
+
+  extern ASN1_API asn1_retCode
+    asn1_read_tag (ASN1_TYPE root, const char *name,
+                  int *tagValue, int *classValue);
+
+  extern ASN1_API const char *asn1_find_structure_from_oid (ASN1_TYPE
+                                                           definitions,
+                                                           const char
+                                                           *oidValue);
+
+  extern ASN1_API const char *asn1_check_version (const char *req_version);
+
+  extern ASN1_API const char *asn1_strerror (asn1_retCode error);
+
+  extern ASN1_API void asn1_perror (asn1_retCode error);
 
   /* DER utility functions. */
 
-  ASN1_API int
-  asn1_get_tag_der (const unsigned char *der, int der_len,
-                   unsigned char *cls, int *len,
-                   unsigned long *tag);
+  extern ASN1_API int
+    asn1_get_tag_der (const unsigned char *der, int der_len,
+                     unsigned char *cls, int *len, unsigned long *tag);
 
-  ASN1_API void
-  asn1_octet_der (const unsigned char *str, int str_len,
-                 unsigned char *der, int *der_len);
+  extern ASN1_API void
+    asn1_octet_der (const unsigned char *str, int str_len,
+                   unsigned char *der, int *der_len);
 
-  ASN1_API asn1_retCode
-  asn1_get_octet_der (const unsigned char *der, int der_len,
-                     int *ret_len, unsigned char *str,
-                     int str_size, int *str_len);
+  extern ASN1_API asn1_retCode
+    asn1_get_octet_der (const unsigned char *der, int der_len,
+                       int *ret_len, unsigned char *str,
+                       int str_size, int *str_len);
 
-  ASN1_API void asn1_bit_der (const unsigned char *str, int bit_len,
-                             unsigned char *der, int *der_len);
+  extern ASN1_API void asn1_bit_der (const unsigned char *str, int bit_len,
+                                    unsigned char *der, int *der_len);
 
-  ASN1_API asn1_retCode
-  asn1_get_bit_der (const unsigned char *der, int der_len,
-                   int *ret_len, unsigned char *str,
-                   int str_size, int *bit_len);
+  extern ASN1_API asn1_retCode
+    asn1_get_bit_der (const unsigned char *der, int der_len,
+                     int *ret_len, unsigned char *str,
+                     int str_size, int *bit_len);
 
-  ASN1_API signed long
-  asn1_get_length_der (const unsigned char *der, int der_len, int *len);
+  extern ASN1_API signed long
+    asn1_get_length_der (const unsigned char *der, int der_len, int *len);
 
-  ASN1_API signed long
-  asn1_get_length_ber (const unsigned char *ber, int ber_len, int *len);
+  extern ASN1_API signed long
+    asn1_get_length_ber (const unsigned char *ber, int ber_len, int *len);
 
-  ASN1_API void
-  asn1_length_der (unsigned long int len, unsigned char *ans, int *ans_len);
+  extern ASN1_API void
+    asn1_length_der (unsigned long int len, unsigned char *ans, int *ans_len);
 
   /* Other utility functions. */
 
-  ASN1_API ASN1_TYPE
-  asn1_find_node (ASN1_TYPE pointer, const char *name);
+  extern ASN1_API ASN1_TYPE
+    asn1_find_node (ASN1_TYPE pointer, const char *name);
 
-  ASN1_API asn1_retCode
-  asn1_copy_node (ASN1_TYPE dst, const char *dst_name,
-                 ASN1_TYPE src, const char *src_name);
+  extern ASN1_API asn1_retCode
+    asn1_copy_node (ASN1_TYPE dst, const char *dst_name,
+                   ASN1_TYPE src, const char *src_name);
 
   /* Deprecated stuff. */
 
@@ -314,14 +302,12 @@ extern "C"
 #endif
 
   /* Use asn1_strerror instead. */
-  ASN1_API const char *
-  libtasn1_strerror (asn1_retCode error)
+  extern ASN1_API const char *libtasn1_strerror (asn1_retCode error)
     __attribute__ ((deprecated));
 
   /* Use asn1_perror instead. */
-  ASN1_API void
-  libtasn1_perror (asn1_retCode error)
-    __attribute__ ((deprecated));
+  extern ASN1_API void
+    libtasn1_perror (asn1_retCode error) __attribute__ ((deprecated));
 
 #endif
 
diff --git a/lib/minitasn1/parser_aux.c b/lib/minitasn1/parser_aux.c
index b740a1e..a3150a8 100644
--- a/lib/minitasn1/parser_aux.c
+++ b/lib/minitasn1/parser_aux.c
@@ -83,12 +83,12 @@ _asn1_add_node (unsigned int type)
  * @pointer: NODE_ASN element pointer.
  * @name: null terminated string with the element's name to find.
  *
- * Searches for an element called NAME starting from POINTER.  The
+ * Searches for an element called @name starting from @pointer.  The
  * name is composed by differents identifiers separated by dots.  When
- * *POINTER has a name, the first identifier must be the name of
- * *POINTER, otherwise it must be the name of one child of *POINTER.
+ * address@hidden has a name, the first identifier must be the name of
+ * address@hidden, otherwise it must be the name of one child of address@hidden
  *
- * Return value: the searching result. NULL if not found.
+ * Returns: the search result, or %NULL if not found.
  **/
 ASN1_TYPE
 asn1_find_node (ASN1_TYPE pointer, const char *name)
@@ -160,7 +160,7 @@ asn1_find_node (ASN1_TYPE pointer, const char *name)
 
       p = p->down;
 
-      /* The identifier "?LAST" indicates the last element 
+      /* The identifier "?LAST" indicates the last element
          in the right chain. */
       if (!strcmp (n, "?LAST"))
        {
@@ -1095,90 +1095,3 @@ _asn1_set_default_tag (ASN1_TYPE node)
 
   return ASN1_SUCCESS;
 }
-
-
-
-static const char *
-parse_version_number (const char *s, int *number)
-{
-  int val = 0;
-
-  if (*s == '0' && isdigit (s[1]))
-    return NULL;               /* leading zeros are not allowed */
-  for (; isdigit (*s); s++)
-    {
-      val *= 10;
-      val += *s - '0';
-    }
-  *number = val;
-  return val < 0 ? NULL : s;
-}
-
-/* The parse version functions were copied from libgcrypt.
- */
-static const char *
-parse_version_string (const char *s, int *major, int *minor, int *micro)
-{
-  s = parse_version_number (s, major);
-  if (!s || *s != '.')
-    return NULL;
-  s++;
-  s = parse_version_number (s, minor);
-  if (!s)
-    return NULL;
-  if (*s != '.')
-    {
-      *micro = 0;
-      return s;
-    }
-  s++;
-  s = parse_version_number (s, micro);
-  if (!s)
-    return NULL;
-  return s;                    /* patchlevel */
-}
-
-/**
- * asn1_check_version:
- * @req_version: Required version number, or NULL.
- *
- * Check that the version of the library is at minimum the
- * requested one and return the version string; return %NULL if the
- * condition is not satisfied.  If a %NULL is passed to this function,
- * no check is done, but the version string is simply returned.
- *
- * See %ASN1_VERSION for a suitable @req_version string.
- *
- * Return value: Version string of run-time library, or %NULL if the
- *   run-time library does not meet the required version number.
- */
-const char *
-asn1_check_version (const char *req_version)
-{
-  const char *ver = ASN1_VERSION;
-  int my_major, my_minor, my_micro;
-  int rq_major, rq_minor, rq_micro;
-  const char *my_plvl, *rq_plvl;
-
-  if (!req_version)
-    return ver;
-
-  my_plvl = parse_version_string (ver, &my_major, &my_minor, &my_micro);
-  if (!my_plvl)
-    return NULL;               /* very strange our own version is bogus */
-  rq_plvl = parse_version_string (req_version, &rq_major, &rq_minor,
-                                 &rq_micro);
-  if (!rq_plvl)
-    return NULL;               /* req version string is invalid */
-
-  if (my_major > rq_major
-      || (my_major == rq_major && my_minor > rq_minor)
-      || (my_major == rq_major && my_minor == rq_minor
-         && my_micro > rq_micro)
-      || (my_major == rq_major && my_minor == rq_minor
-         && my_micro == rq_micro && strcmp (my_plvl, rq_plvl) >= 0))
-    {
-      return ver;
-    }
-  return NULL;
-}
diff --git a/lib/minitasn1/parser_aux.h b/lib/minitasn1/parser_aux.h
index 564f64e..def52ed 100644
--- a/lib/minitasn1/parser_aux.h
+++ b/lib/minitasn1/parser_aux.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010 Free
+ * Software Foundation, Inc.
+ *
+ * This file is part of LIBTASN1.
+ *
+ * The LIBTASN1 library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ */
 
 #ifndef _PARSER_AUX_H
 #define _PARSER_AUX_H
diff --git a/lib/minitasn1/structure.h b/lib/minitasn1/structure.h
index 7257986..3885afc 100644
--- a/lib/minitasn1/structure.h
+++ b/lib/minitasn1/structure.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free
+ * Software Foundation, Inc.
+ *
+ * This file is part of LIBTASN1.
+ *
+ * The LIBTASN1 library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ */
 
 /*************************************************/
 /* File: structure.h                             */
diff --git a/lib/minitasn1/version.c b/lib/minitasn1/version.c
new file mode 100644
index 0000000..ad7b43e
--- /dev/null
+++ b/lib/minitasn1/version.c
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010 Free
+ * Software Foundation, Inc.
+ *
+ * This file is part of LIBTASN1.
+ *
+ * The LIBTASN1 library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>            /* for strverscmp */
+
+#include "libtasn1.h"
+
+/**
+ * asn1_check_version:
+ * @req_version: Required version number, or %NULL.
+ *
+ * Check that the version of the library is at minimum the
+ * requested one and return the version string; return %NULL if the
+ * condition is not satisfied.  If a %NULL is passed to this function,
+ * no check is done, but the version string is simply returned.
+ *
+ * See %ASN1_VERSION for a suitable @req_version string.
+ *
+ * Returns: Version string of run-time library, or %NULL if the
+ *   run-time library does not meet the required version number.
+ */
+const char *
+asn1_check_version (const char *req_version)
+{
+  if (!req_version || strverscmp (req_version, ASN1_VERSION) <= 0)
+    return ASN1_VERSION;
+
+  return NULL;
+}
diff --git a/maint.mk b/maint.mk
index 4115dbf..b24093b 100644
--- a/maint.mk
+++ b/maint.mk
@@ -660,9 +660,10 @@ sc_GFDL_version:
          $(_sc_search_regexp)
 
 # Don't use Texinfo @acronym{} as it is not a good idea.
+texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
 sc_texinfo_acronym:
-       @prohibit='@acronym{'                                           \
-       in_vc_files='\.texi$$'                                          \
+       @prohibit='@acronym\{'                                          \
+       in_vc_files='$(texinfo_suffix_re_)'                             \
        halt='found use of Texinfo @acronym{}'                          \
          $(_sc_search_regexp)
 
@@ -693,16 +694,18 @@ sc_prohibit_cvs_keyword:
 #   perl -pi -0777 -e 's/\n\n+$/\n/' files...
 #
 detect_empty_lines_at_EOF_ =                                           \
-  foreach my $$f (@ARGV) {                                             \
-    open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next;      \
-    my $$p = sysseek (F, -2, 2);                                       \
-    my $$c = "seek failure probably means file has < 2 bytes; ignore"; \
-    my $$two;                                                          \
-    defined $$p and $$p = sysread F, $$two, 2;                         \
-    close F;                                                           \
-    $$c = "ignore read failure";                                       \
-    $$p && $$two eq "\n\n" and (print $$f), $$fail=1;                  \
-    } END { exit defined $$fail }
+  foreach my $$f (@ARGV)                                               \
+    {                                                                  \
+      open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next;    \
+      my $$p = sysseek (F, -2, 2);                                     \
+      my $$c = "seek failure probably means file has < 2 bytes; ignore"; \
+      my $$last_two_bytes;                                             \
+      defined $$p and $$p = sysread F, $$last_two_bytes, 2;            \
+      close F;                                                         \
+      $$c = "ignore read failure";                                     \
+      $$p && $$last_two_bytes eq "\n\n" and (print $$f), $$fail=1;     \
+    }                                                                  \
+  END { exit defined $$fail }
 sc_prohibit_empty_lines_at_EOF:
        @perl -le '$(detect_empty_lines_at_EOF_)' $$($(VC_LIST_EXCEPT)) \
           || { echo '$(ME): the above files end with empty line(s)'     \


hooks/post-receive
-- 
GNU gnutls




reply via email to

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