summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-06-20 10:48:53 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-06-20 10:48:53 +0200
commitc523855da610fc90709a58d16c60b94dcff091ae (patch)
tree5d97fe5f0f4d676d99686f5721dd124854e4364e
parent50c97c70f0386eeb515d8334771d120c02c1a753 (diff)
downloadlibtasn1-c523855da610fc90709a58d16c60b94dcff091ae.tar.gz
don't export asn1_get_time_der
-rw-r--r--NEWS1
-rw-r--r--lib/decoding.c40
-rw-r--r--lib/libtasn1.h4
-rw-r--r--lib/libtasn1.map1
4 files changed, 15 insertions, 31 deletions
diff --git a/NEWS b/NEWS
index c8c5920..7d10c14 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,6 @@ GNU Libtasn1 NEWS -*- outline -*-
- Allow decoding OCTET STRINGs with multi-byte tags.
- 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 4608cde..4d2302f 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -276,10 +276,22 @@ asn1_get_octet_der (const unsigned char *der, int der_len,
}
-/* As with asn1_get_time_der().
- *
+/*-
+ * _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
- */
+ *
+ * Performs basic checks in the DER encoded time object and returns its textual form.
+ * The textual form will be in the YYYYMMDD000000Z format for GeneralizedTime
+ * and YYMMDD000000Z for UTCTime.
+ *
+ * Returns: %ASN1_SUCCESS on success, or an error.
+ -*/
static int
_asn1_get_time_der (unsigned type, const unsigned char *der, int der_len, int *ret_len,
char *str, int str_size, unsigned flags)
@@ -349,28 +361,6 @@ _asn1_get_time_der (unsigned type, const unsigned char *der, int der_len, int *r
}
/**
- * 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.
- *
- * Performs basic checks in the DER encoded time object and returns its textual form.
- * The textual form will be in the YYYYMMDD000000Z format for GeneralizedTime
- * and YYMMDD000000Z for UTCTime.
- *
- * 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)
-{
- return _asn1_get_time_der(type, der, der_len, ret_len, str, str_size, ASN1_DECODE_FLAG_STRICT_DER);
-}
-
-/**
* asn1_get_objectid_der:
* @der: DER data to decode containing the OBJECT IDENTIFIER
* @der_len: Length of DER data to decode.
diff --git a/lib/libtasn1.h b/lib/libtasn1.h
index 6dcccc6..4d3772b 100644
--- a/lib/libtasn1.h
+++ b/lib/libtasn1.h
@@ -379,10 +379,6 @@ 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);
-
/* Compatibility types */
typedef int asn1_retCode; /* type returned by libtasn1 functions */
diff --git a/lib/libtasn1.map b/lib/libtasn1.map
index eb71493..007925c 100644
--- a/lib/libtasn1.map
+++ b/lib/libtasn1.map
@@ -57,7 +57,6 @@ LIBTASN1_0_3
asn1_delete_structure2;
asn1_dup_node;
asn1_decode_simple_ber;
- asn1_get_time_der;
asn1_get_object_id_der;
local:
*;