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_1_0-80-gca407fd


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_1_0-80-gca407fd
Date: Sun, 16 Sep 2012 19:21:46 +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=ca407fdfc5f250008b961ed56a6951195b78e5e7

The branch, master has been updated
       via  ca407fdfc5f250008b961ed56a6951195b78e5e7 (commit)
       via  3efa70984ec512173e8cb54ec4f022373ac2f45a (commit)
      from  cf31e43a972ac163bc1181ffdd61bb658770cda1 (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 ca407fdfc5f250008b961ed56a6951195b78e5e7
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Sep 16 21:21:28 2012 +0200

    updated minitasn1

commit 3efa70984ec512173e8cb54ec4f022373ac2f45a
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Sep 16 21:20:04 2012 +0200

    Use the pkg-config macro to find libtasn1.

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

Summary of changes:
 lib/Makefile.am          |    3 ++-
 lib/minitasn1/element.c  |   20 ++++++++++++++++++++
 lib/minitasn1/int.h      |   44 ++++++++++++++++++++++----------------------
 lib/minitasn1/libtasn1.h |   38 +++++++++++++++++++++++++++++++++++++-
 m4/hooks.m4              |    6 ++----
 5 files changed, 83 insertions(+), 28 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index 8df6d9b..d0951d4 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -37,6 +37,7 @@ AM_CPPFLAGS = \
        -I$(srcdir)/includes                    \
        -I$(builddir)/includes                  \
        -I$(srcdir)/x509                        \
+       $(LIBTASN1_CFLAGS)                      \
        $(P11_KIT_CFLAGS)
 
 if ENABLE_OPENPGP
@@ -142,7 +143,7 @@ endif
 if ENABLE_MINITASN1
 libgnutls_la_LIBADD += minitasn1/libminitasn1.la
 else
-libgnutls_la_LDFLAGS += $(LTLIBTASN1)
+libgnutls_la_LDFLAGS += $(LIBTASN1_LIBS)
 endif
 
 if ENABLE_NETTLE
diff --git a/lib/minitasn1/element.c b/lib/minitasn1/element.c
index ead899c..8e8807b 100644
--- a/lib/minitasn1/element.c
+++ b/lib/minitasn1/element.c
@@ -976,3 +976,23 @@ asn1_read_tag (ASN1_TYPE root, const char *name, int 
*tagValue,
 
   return ASN1_SUCCESS;
 }
+
+/**
+ * asn1_read_node_value:
+ * @node: pointer to a node.
+ * @data: a point to a node_data_struct
+ *
+ * Returns the value a data node inside a ASN1_TYPE structure.
+ * The data returned should be handled as constant values.
+ *
+ * Returns: %ASN1_SUCCESS if the node exists.
+ **/
+asn1_retCode asn1_read_node_value (ASN1_TYPE node, ASN1_DATA_NODE* data)
+{
+  data->name = node->name;
+  data->value = node->value;
+  data->value_len = node->value_len;
+  data->type = type_field(node->type);
+  
+  return ASN1_SUCCESS;
+}
diff --git a/lib/minitasn1/int.h b/lib/minitasn1/int.h
index 82de579..aad7ba6 100644
--- a/lib/minitasn1/int.h
+++ b/lib/minitasn1/int.h
@@ -83,28 +83,28 @@ struct node_asn_struct
 #define type_field(x)     (x&0xFF)
 
 /* List of constants for field type of typedef node_asn  */
-#define TYPE_CONSTANT       1
-#define TYPE_IDENTIFIER     2
-#define TYPE_INTEGER        3
-#define TYPE_BOOLEAN        4
-#define TYPE_SEQUENCE       5
-#define TYPE_BIT_STRING     6
-#define TYPE_OCTET_STRING   7
-#define TYPE_TAG            8
-#define TYPE_DEFAULT        9
-#define TYPE_SIZE          10
-#define TYPE_SEQUENCE_OF   11
-#define TYPE_OBJECT_ID     12
-#define TYPE_ANY           13
-#define TYPE_SET           14
-#define TYPE_SET_OF        15
-#define TYPE_DEFINITIONS   16
-#define TYPE_TIME          17
-#define TYPE_CHOICE        18
-#define TYPE_IMPORTS       19
-#define TYPE_NULL          20
-#define TYPE_ENUMERATED    21
-#define TYPE_GENERALSTRING 27
+#define TYPE_CONSTANT      ASN1_ETYPE_CONSTANT
+#define TYPE_IDENTIFIER    ASN1_ETYPE_IDENTIFIER
+#define TYPE_INTEGER       ASN1_ETYPE_INTEGER
+#define TYPE_BOOLEAN       ASN1_ETYPE_BOOLEAN
+#define TYPE_SEQUENCE      ASN1_ETYPE_SEQUENCE
+#define TYPE_BIT_STRING    ASN1_ETYPE_BIT_STRING
+#define TYPE_OCTET_STRING  ASN1_ETYPE_OCTET_STRING
+#define TYPE_TAG           ASN1_ETYPE_TAG
+#define TYPE_DEFAULT       ASN1_ETYPE_DEFAULT
+#define TYPE_SIZE          ASN1_ETYPE_SIZE
+#define TYPE_SEQUENCE_OF   ASN1_ETYPE_SEQUENCE_OF
+#define TYPE_OBJECT_ID     ASN1_ETYPE_OBJECT_ID
+#define TYPE_ANY           ASN1_ETYPE_ANY
+#define TYPE_SET           ASN1_ETYPE_SET
+#define TYPE_SET_OF        ASN1_ETYPE_SET_OF
+#define TYPE_DEFINITIONS   ASN1_ETYPE_DEFINITIONS
+#define TYPE_TIME          ASN1_ETYPE_TIME
+#define TYPE_CHOICE        ASN1_ETYPE_CHOICE
+#define TYPE_IMPORTS       ASN1_ETYPE_IMPORTS
+#define TYPE_NULL          ASN1_ETYPE_NULL
+#define TYPE_ENUMERATED    ASN1_ETYPE_ENUMERATED
+#define TYPE_GENERALSTRING ASN1_ETYPE_GENERALSTRING
 
 
 /***********************************************************************/
diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h
index 063b1d6..e9337e2 100644
--- a/lib/minitasn1/libtasn1.h
+++ b/lib/minitasn1/libtasn1.h
@@ -44,7 +44,7 @@ extern "C"
 {
 #endif
 
-#define ASN1_VERSION "2.13"
+#define ASN1_VERSION "2.14"
 
   typedef int asn1_retCode;    /* type returned by libtasn1 functions */
 
@@ -141,6 +141,39 @@ extern "C"
   };
   typedef struct static_struct_asn ASN1_ARRAY_TYPE;
 
+/* List of constants for field type of typedef node_asn  */
+#define ASN1_ETYPE_CONSTANT       1
+#define ASN1_ETYPE_IDENTIFIER     2
+#define ASN1_ETYPE_INTEGER        3
+#define ASN1_ETYPE_BOOLEAN        4
+#define ASN1_ETYPE_SEQUENCE       5
+#define ASN1_ETYPE_BIT_STRING     6
+#define ASN1_ETYPE_OCTET_STRING   7
+#define ASN1_ETYPE_TAG            8
+#define ASN1_ETYPE_DEFAULT        9
+#define ASN1_ETYPE_SIZE          10
+#define ASN1_ETYPE_SEQUENCE_OF   11
+#define ASN1_ETYPE_OBJECT_ID     12
+#define ASN1_ETYPE_ANY           13
+#define ASN1_ETYPE_SET           14
+#define ASN1_ETYPE_SET_OF        15
+#define ASN1_ETYPE_DEFINITIONS   16
+#define ASN1_ETYPE_TIME          17
+#define ASN1_ETYPE_CHOICE        18
+#define ASN1_ETYPE_IMPORTS       19
+#define ASN1_ETYPE_NULL          20
+#define ASN1_ETYPE_ENUMERATED    21
+#define ASN1_ETYPE_GENERALSTRING 27
+
+  struct node_data_struct
+  {
+    const char *name;          /* Node name */
+    const void *value;         /* Node value */
+    unsigned int value_len;     /* Node value size */
+    unsigned int type;         /* Node value type (ASN1_ETYPE_*) */
+  };
+  typedef struct node_data_struct ASN1_DATA_NODE;
+
   /***********************************/
   /*  Fixed constants                */
   /***********************************/
@@ -193,6 +226,9 @@ extern "C"
                     void *ivalue, int *len);
 
   extern ASN1_API asn1_retCode
+    asn1_read_node_value (ASN1_TYPE node, ASN1_DATA_NODE* data);
+
+  extern ASN1_API asn1_retCode
     asn1_number_of_elements (ASN1_TYPE element, const char *name, int *num);
 
   extern ASN1_API asn1_retCode
diff --git a/m4/hooks.m4 b/m4/hooks.m4
index ed5cb2f..b38c27e 100644
--- a/m4/hooks.m4
+++ b/m4/hooks.m4
@@ -99,10 +99,8 @@ fi
       included_libtasn1=$withval,
       included_libtasn1=no)
   if test "$included_libtasn1" = "no"; then
-    AC_LIB_HAVE_LINKFLAGS(tasn1,, [#include <libtasn1.h>],
-                          [asn1_check_version (NULL)])
-    if test "$ac_cv_libtasn1" != yes; then
-      included_libtasn1=yes
+    PKG_CHECK_MODULES(LIBTASN1, [libtasn1 >= 2.14], [], 
[included_libtasn1=yes])
+    if test "$included_libtasn1" = yes; then
       AC_MSG_WARN([[
   *** 
   *** Libtasn1 was not found. Will use the included one.


hooks/post-receive
-- 
GNU gnutls



reply via email to

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