summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-12-06 14:52:44 +0100
committerSimon Josefsson <simon@josefsson.org>2010-12-06 14:52:44 +0100
commita37f2f9835a576de14a1a665ed8f874622e42ade (patch)
treef65d3ab6b7b3efb080c3233d0c9bcdab5e569ecc
parent8dc97ea0b40cd95a0f69b73d8a774aa1e2cbbe0e (diff)
downloadgnutls-a37f2f9835a576de14a1a665ed8f874622e42ade.tar.gz
minitasn1: Updated to Libtasn1 2.9.
-rw-r--r--NEWS2
-rw-r--r--lib/minitasn1/coding.c15
-rw-r--r--lib/minitasn1/element.c35
-rw-r--r--lib/minitasn1/libtasn1.h2
-rw-r--r--lib/minitasn1/structure.c47
5 files changed, 33 insertions, 68 deletions
diff --git a/NEWS b/NEWS
index cae51e941a..49a97140c8 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,8 @@ This makes us comply with RFC3279. Reported by Michael Rommel.
introduced GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT. Thus by default
V1 trusted CAs are allowed, unless the new flag is specified.
+** minitasn1: Updated to Libtasn1 2.9.
+
** API and ABI modifications:
No changes since last version.
diff --git a/lib/minitasn1/coding.c b/lib/minitasn1/coding.c
index 31b5ebb176..0c357ebccf 100644
--- a/lib/minitasn1/coding.c
+++ b/lib/minitasn1/coding.c
@@ -857,16 +857,11 @@ _asn1_ordering_set_of (unsigned char *der, int der_len, ASN1_TYPE node)
* Creates the DER encoding for the NAME structure (inside *POINTER
* structure).
*
- * Returns:
- *
- * %ASN1_SUCCESS: DER encoding OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
- *
- * %ASN1_VALUE_NOT_FOUND: There is an element without a value.
- *
- * %ASN1_MEM_ERROR: @ider vector isn't big enough. Also in this case
- * LEN will contain the length needed.
+ * Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND
+ * if @name is not a valid element, %ASN1_VALUE_NOT_FOUND if there
+ * is an element without a value, %ASN1_MEM_ERROR if the @ider
+ * vector isn't big enough and in this case @len will contain the
+ * length needed.
**/
asn1_retCode
asn1_der_coding (ASN1_TYPE element, const char *name, void *ider, int *len,
diff --git a/lib/minitasn1/element.c b/lib/minitasn1/element.c
index 51ade14f3b..71b893e28d 100644
--- a/lib/minitasn1/element.c
+++ b/lib/minitasn1/element.c
@@ -264,13 +264,9 @@ _asn1_append_sequence_set (ASN1_TYPE node)
* result=asn1_write_value(cert,
* "tbsCertificate.subject.rdnSequence.?LAST", "NEW", 1);
*
- * Returns:
- *
- * %ASN1_SUCCESS: Set value OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
- *
- * %ASN1_VALUE_NOT_VALID: VALUE has a wrong format.
+ * Returns: %ASN1_SUCCESS if the value was set,
+ * %ASN1_ELEMENT_NOT_FOUND if @name is not a valid element, and
+ * %ASN1_VALUE_NOT_VALID if @ivalue has a wrong format.
**/
asn1_retCode
asn1_write_value (ASN1_TYPE node_root, const char *name,
@@ -697,16 +693,12 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
* ANY: If NAME indicates an any type, VALUE will indicate the DER
* encoding of the structure actually used.
*
- * Returns:
- *
- * %ASN1_SUCCESS: Set value OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
- *
- * %ASN1_VALUE_NOT_FOUND: There isn't any value for the element selected.
- *
- * %ASN1_MEM_ERROR: The value vector isn't big enough to store the result.
- * In this case LEN will contain the number of bytes needed.
+ * Returns: %ASN1_SUCCESS if value is returned,
+ * %ASN1_ELEMENT_NOT_FOUND if @name is not a valid element,
+ * %ASN1_VALUE_NOT_FOUND if there isn't any value for the element
+ * selected, and %ASN1_MEM_ERROR if The value vector isn't big enough
+ * to store the result, and in this case @len will contain the number of
+ * bytes needed.
**/
asn1_retCode
asn1_read_value (ASN1_TYPE root, const char *name, void *ivalue, int *len)
@@ -883,11 +875,8 @@ asn1_read_value (ASN1_TYPE root, const char *name, void *ivalue, int *len)
* %ASN1_CLASS_UNIVERSAL, %ASN1_CLASS_PRIVATE or
* %ASN1_CLASS_CONTEXT_SPECIFIC.
*
- * Returns:
- *
- * %ASN1_SUCCESS: Set value OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: NAME is not a valid element.
+ * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if
+ * @name is not a valid element.
**/
asn1_retCode
asn1_read_tag (ASN1_TYPE root, const char *name, int *tagValue,
@@ -986,7 +975,5 @@ asn1_read_tag (ASN1_TYPE root, const char *name, int *tagValue,
}
}
-
return ASN1_SUCCESS;
-
}
diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h
index fd3a1393f5..493601f86c 100644
--- a/lib/minitasn1/libtasn1.h
+++ b/lib/minitasn1/libtasn1.h
@@ -45,7 +45,7 @@ extern "C"
{
#endif
-#define ASN1_VERSION "2.6"
+#define ASN1_VERSION "2.9"
typedef int asn1_retCode; /* type returned by libtasn1 functions */
diff --git a/lib/minitasn1/structure.c b/lib/minitasn1/structure.c
index b1c5b30c96..a272d622d7 100644
--- a/lib/minitasn1/structure.c
+++ b/lib/minitasn1/structure.c
@@ -168,16 +168,11 @@ _asn1_create_static_structure (ASN1_TYPE pointer, char *output_file_name,
* Creates the structures needed to manage the ASN.1 definitions.
* @array is a vector created by asn1_parser2array().
*
- * Returns:
- *
- * %ASN1_SUCCESS: Structure created correctly.
- *
- * %ASN1_ELEMENT_NOT_EMPTY: *@definitions not ASN1_TYPE_EMPTY.
- *
- * %ASN1_IDENTIFIER_NOT_FOUND: In the file there is an identifier that
- * is not defined (see @errorDescription for more information).
- *
- * %ASN1_ARRAY_ERROR: The array pointed by @array is wrong.
+ * Returns: %ASN1_SUCCESS if structure was created correctly,
+ * %ASN1_ELEMENT_NOT_EMPTY if *@definitions not ASN1_TYPE_EMPTY,
+ * %ASN1_IDENTIFIER_NOT_FOUND if in the file there is an identifier
+ * that is not defined (see @errorDescription for more information),
+ * %ASN1_ARRAY_ERROR if the array pointed by @array is wrong.
**/
asn1_retCode
asn1_array2tree (const ASN1_ARRAY_TYPE * array, ASN1_TYPE * definitions,
@@ -284,11 +279,8 @@ asn1_array2tree (const ASN1_ARRAY_TYPE * array, ASN1_TYPE * definitions,
* Deletes the structure *@structure. At the end, *@structure is set
* to ASN1_TYPE_EMPTY.
*
- * Returns:
- *
- * %ASN1_SUCCESS: Everything OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: *@structure was ASN1_TYPE_EMPTY.
+ * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if
+ * *@structure was ASN1_TYPE_EMPTY.
**/
asn1_retCode
asn1_delete_structure (ASN1_TYPE * structure)
@@ -351,11 +343,8 @@ asn1_delete_structure (ASN1_TYPE * structure)
*
* Deletes the element named *@element_name inside *@structure.
*
- * Returns:
- *
- * %ASN1_SUCCESS: Everything OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: The name element was not found.
+ * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if
+ * the @element_name was not found.
**/
asn1_retCode
asn1_delete_element (ASN1_TYPE structure, const char *element_name)
@@ -670,11 +659,8 @@ _asn1_expand_identifier (ASN1_TYPE * node, ASN1_TYPE root)
*
* rc = asn1_create_element(cert_def, "PKIX1.Certificate", certptr);
*
- * Returns:
- *
- * %ASN1_SUCCESS: Creation OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: SOURCE_NAME isn't known
+ * Returns: %ASN1_SUCCESS if creation OK, %ASN1_ELEMENT_NOT_FOUND if
+ * @source_name is not known.
**/
asn1_retCode
asn1_create_element (ASN1_TYPE definitions, const char *source_name,
@@ -1072,13 +1058,8 @@ asn1_print_structure (FILE * out, ASN1_TYPE structure, const char *name,
* Counts the number of elements of a sub-structure called NAME with
* names equal to "?1","?2", ...
*
- * Returns:
- *
- * %ASN1_SUCCESS: Creation OK.
- *
- * %ASN1_ELEMENT_NOT_FOUND: NAME isn't known.
- *
- * %ASN1_GENERIC_ERROR: Pointer num equal to NULL.
+ * Returns: %ASN1_SUCCESS if successful, %ASN1_ELEMENT_NOT_FOUND if
+ * @name is not known, %ASN1_GENERIC_ERROR if pointer @num is %NULL.
**/
asn1_retCode
asn1_number_of_elements (ASN1_TYPE element, const char *name, int *num)
@@ -1171,7 +1152,7 @@ asn1_find_structure_from_oid (ASN1_TYPE definitions, const char *oidValue)
*
* Create a deep copy of a ASN1_TYPE variable.
*
- * Return value: Return %ASN1_SUCCESS on success.
+ * Returns: Return %ASN1_SUCCESS on success.
**/
asn1_retCode
asn1_copy_node (ASN1_TYPE dst, const char *dst_name,