diff options
author | Simon Josefsson <simon@josefsson.org> | 2011-10-25 20:31:39 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2011-10-25 20:31:39 +0200 |
commit | c9e0c70d588e0f80d313d13a9ad5f44f62546d9c (patch) | |
tree | bd0e5911f12d02e943e78c597045edd2d3942aba /lib | |
parent | 5a110e397e7dc01f7c557ec63811be08ecaa28e7 (diff) | |
download | gnutls-c9e0c70d588e0f80d313d13a9ad5f44f62546d9c.tar.gz |
Update to libtasn1 2.10.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/minitasn1/decoding.c | 7 | ||||
-rw-r--r-- | lib/minitasn1/element.c | 39 | ||||
-rw-r--r-- | lib/minitasn1/element.h | 4 | ||||
-rw-r--r-- | lib/minitasn1/errors.c | 6 | ||||
-rw-r--r-- | lib/minitasn1/gstr.c | 2 | ||||
-rw-r--r-- | lib/minitasn1/gstr.h | 2 | ||||
-rw-r--r-- | lib/minitasn1/int.h | 4 | ||||
-rw-r--r-- | lib/minitasn1/libtasn1.h | 6 | ||||
-rw-r--r-- | lib/minitasn1/parser_aux.c | 4 | ||||
-rw-r--r-- | lib/minitasn1/parser_aux.h | 4 | ||||
-rw-r--r-- | lib/minitasn1/structure.c | 49 | ||||
-rw-r--r-- | lib/minitasn1/structure.h | 2 | ||||
-rw-r--r-- | lib/minitasn1/version.c | 4 |
13 files changed, 50 insertions, 83 deletions
diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c index ae32c98b03..3849375d07 100644 --- a/lib/minitasn1/decoding.c +++ b/lib/minitasn1/decoding.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010 Free Software + * Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010, 2011 Free Software * Foundation, Inc. * * This file is part of LIBTASN1. @@ -168,7 +168,7 @@ 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. * - * Returns: Return the decoded length value, or negative error code when + * Returns: Return the decoded length value, or negative value when * the value was too big. * * Since: 2.0 @@ -1367,7 +1367,7 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName, char temp[128], currentName[ASN1_MAX_NAME_SIZE * 10], *dot_p, *char_p; int nameLen = ASN1_MAX_NAME_SIZE * 10 - 1, state; int counter, len2, len3, len4, move, ris, tlen; - unsigned char class, *temp2; + unsigned char class; unsigned long tag; int indefinite, result; const unsigned char *der = ider; @@ -1921,7 +1921,6 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName, if (state == FOUND) { _asn1_set_value_octet (p, der + counter, len2 + len3); - temp2 = NULL; if (p == nodeFound) state = EXIT; diff --git a/lib/minitasn1/element.c b/lib/minitasn1/element.c index 51ade14f3b..a8fdc929e3 100644 --- a/lib/minitasn1/element.c +++ b/lib/minitasn1/element.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 - * Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010, + * 2011 Free Software Foundation, Inc. * * This file is part of LIBTASN1. * @@ -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/element.h b/lib/minitasn1/element.h index 95c382a176..67a234f50a 100644 --- a/lib/minitasn1/element.h +++ b/lib/minitasn1/element.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 - * Free Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010, + * 2011 Free Software Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/errors.c b/lib/minitasn1/errors.c index 271158d9d8..c5508dae85 100644 --- a/lib/minitasn1/errors.c +++ b/lib/minitasn1/errors.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010 Free Software + * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010, 2011 Free Software * Foundation, Inc. * * This file is part of LIBTASN1. @@ -85,7 +85,7 @@ asn1_perror (asn1_retCode error) * * This function replaces libtasn1_strerror() in older libtasn1. * - * Returns: Pointer to static (0)-terminated string describing error + * Returns: Pointer to static zero-terminated string describing error * code. * * Since: 1.6 @@ -130,7 +130,7 @@ libtasn1_perror (asn1_retCode error) * similar to strerror. The only difference is that it accepts an * error (number) returned by a libtasn1 function. * - * Returns: Pointer to static (0)-terminated string describing error + * Returns: Pointer to static zero-terminated string describing error * code. * * Deprecated: Use asn1_strerror() instead. diff --git a/lib/minitasn1/gstr.c b/lib/minitasn1/gstr.c index b3f6af27a1..32ab904cd4 100644 --- a/lib/minitasn1/gstr.c +++ b/lib/minitasn1/gstr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Free Software + * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010, 2011 Free Software * Foundation, Inc. * * This file is part of LIBTASN1. diff --git a/lib/minitasn1/gstr.h b/lib/minitasn1/gstr.h index bffb912332..33bdec94f4 100644 --- a/lib/minitasn1/gstr.h +++ b/lib/minitasn1/gstr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Free Software + * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010, 2011 Free Software * Foundation, Inc. * * This file is part of LIBTASN1. diff --git a/lib/minitasn1/int.h b/lib/minitasn1/int.h index def492759d..6b2b5eb6c6 100644 --- a/lib/minitasn1/int.h +++ b/lib/minitasn1/int.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free - * Software Foundation, Inc. + * Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + * Free Software Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h index fd3a1393f5..78f7b54de1 100644 --- a/lib/minitasn1/libtasn1.h +++ b/lib/minitasn1/libtasn1.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free - * Software Foundation, Inc. + * Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + * Free Software Foundation, Inc. * * This file is part of LIBTASN1. * @@ -45,7 +45,7 @@ extern "C" { #endif -#define ASN1_VERSION "2.6" +#define ASN1_VERSION "2.10" typedef int asn1_retCode; /* type returned by libtasn1 functions */ diff --git a/lib/minitasn1/parser_aux.c b/lib/minitasn1/parser_aux.c index a3150a8e22..597fe6d40a 100644 --- a/lib/minitasn1/parser_aux.c +++ b/lib/minitasn1/parser_aux.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010 Free - * Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010, 2011 + * Free Software Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/parser_aux.h b/lib/minitasn1/parser_aux.h index def52edcf3..ca9e66c395 100644 --- a/lib/minitasn1/parser_aux.h +++ b/lib/minitasn1/parser_aux.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010 Free - * Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010, 2011 + * Free Software Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/structure.c b/lib/minitasn1/structure.c index b1c5b30c96..c3d7896b45 100644 --- a/lib/minitasn1/structure.c +++ b/lib/minitasn1/structure.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free + * Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Free * Software Foundation, Inc. * * This file is part of LIBTASN1. @@ -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, diff --git a/lib/minitasn1/structure.h b/lib/minitasn1/structure.h index 3885afc314..98d32ab93b 100644 --- a/lib/minitasn1/structure.h +++ b/lib/minitasn1/structure.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free + * Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Free * Software Foundation, Inc. * * This file is part of LIBTASN1. diff --git a/lib/minitasn1/version.c b/lib/minitasn1/version.c index ad7b43eb36..c0cf1f2927 100644 --- a/lib/minitasn1/version.c +++ b/lib/minitasn1/version.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010 Free - * Software Foundation, Inc. + * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010, 2011 + * Free Software Foundation, Inc. * * This file is part of LIBTASN1. * |