libtasn1-commit
[Top][All Lists]
Advanced

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

[SCM] GNU libtasn1 branch, master, updated. libtasn1_4_5-5-g1b852ff


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU libtasn1 branch, master, updated. libtasn1_4_5-5-g1b852ff
Date: Tue, 02 Jun 2015 08:17:22 +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 libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=1b852ffe9e806a727b3f4f601cfb2567535b14ec

The branch, master has been updated
       via  1b852ffe9e806a727b3f4f601cfb2567535b14ec (commit)
       via  59104315976ebfbb059be879f9df219a0fa6bb49 (commit)
      from  6bf745b7ef5791d55498c75d0fffc5df33876c26 (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 1b852ffe9e806a727b3f4f601cfb2567535b14ec
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Jun 2 10:15:43 2015 +0200

    doc update

commit 59104315976ebfbb059be879f9df219a0fa6bb49
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Jun 2 10:13:51 2015 +0200

    export asn1_get_time_der()

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

Summary of changes:
 NEWS             |    1 +
 lib/decoding.c   |   23 +++++++++++++++++------
 lib/libtasn1.h   |    4 ++++
 lib/libtasn1.map |    2 ++
 4 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index b0c5a08..00d97cb 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ GNU Libtasn1 NEWS                                     -*- 
outline -*-
 * Noteworthy changes in release 4.6 (unreleased) [stable]
 - API and ABI changes since last version:
   asn1_get_object_id_der: New function
+  asn1_get_time_der: New function
 
 * Noteworthy changes in release 4.5 (released 2015-04-29) [stable]
 - Corrected an invalid memory access in octet string decoding.
diff --git a/lib/decoding.c b/lib/decoding.c
index 5cc7c89..55a9b00 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -275,11 +275,22 @@ 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.
- * type should be one of ASN1_ETYPE_GENERALIZED_TIME or ASN1_ETYPE_UTC_TIME.
- */
-static int
-_asn1_get_time_der (unsigned type, const unsigned char *der, int der_len, int 
*ret_len,
+/**
+ * asn1_get_time_der:
+ * @type: %ASN1_ETYPE_GENERALIZED_TIME or %ASN1_ETYPE_UTC_TIME
+ * @der: DER data to decode containing the time
+ * @der_len: Length of DER data to decode.
+ * @ret_len: Output variable containing the length of the DER data.
+ * @str: Pre-allocated output buffer to put the textual time in.
+ * @str_size: Length of pre-allocated output buffer.
+ * @flags: Zero or %ASN1_DECODE_FLAG_STRICT_DER
+ *
+ * Converts a DER encoded time object to its textual form.
+ *
+ * Returns: %ASN1_SUCCESS on success, or an error.
+ **/
+int
+asn1_get_time_der (unsigned type, const unsigned char *der, int der_len, int 
*ret_len,
                    char *str, int str_size, unsigned flags)
 {
   int len_len, str_len;
@@ -1256,7 +1267,7 @@ asn1_der_decoding2 (asn1_node *element, const void *ider, 
int *max_ider_len,
            case ASN1_ETYPE_GENERALIZED_TIME:
            case ASN1_ETYPE_UTC_TIME:
              result =
-               _asn1_get_time_der (type_field (p->type), der + counter, 
ider_len, &len2, temp,
+               asn1_get_time_der (type_field (p->type), der + counter, 
ider_len, &len2, temp,
                                    sizeof (temp) - 1, flags);
              if (result != ASN1_SUCCESS)
                {
diff --git a/lib/libtasn1.h b/lib/libtasn1.h
index 4d3772b..364ce4e 100644
--- a/lib/libtasn1.h
+++ b/lib/libtasn1.h
@@ -379,6 +379,10 @@ extern "C"
                             int der_len, int *ret_len,
                            char *str, int str_size);
 
+  extern ASN1_API int
+    asn1_get_time_der (unsigned type, const unsigned char *der, int der_len, 
int *ret_len,
+                      char *str, int str_size, unsigned flags);
+
 /* Compatibility types */
 
   typedef int asn1_retCode;    /* type returned by libtasn1 functions */
diff --git a/lib/libtasn1.map b/lib/libtasn1.map
index d5ffa9e..eb71493 100644
--- a/lib/libtasn1.map
+++ b/lib/libtasn1.map
@@ -57,6 +57,8 @@ LIBTASN1_0_3
     asn1_delete_structure2;
     asn1_dup_node;
     asn1_decode_simple_ber;
+    asn1_get_time_der;
+    asn1_get_object_id_der;
   local:
     *;
 };


hooks/post-receive
-- 
GNU libtasn1



reply via email to

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