diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/minitasn1/decoding.c | 8 | ||||
-rw-r--r-- | lib/minitasn1/errors.c | 7 | ||||
-rw-r--r-- | lib/minitasn1/libtasn1.h | 27 | ||||
-rw-r--r-- | lib/minitasn1/parser_aux.c | 10 | ||||
-rw-r--r-- | lib/minitasn1/structure.c | 6 |
5 files changed, 34 insertions, 24 deletions
diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c index 714e65674b..b58735cd16 100644 --- a/lib/minitasn1/decoding.c +++ b/lib/minitasn1/decoding.c @@ -492,7 +492,7 @@ _asn1_get_indefinite_length_string(const unsigned char* der,int* len) * @element: pointer to an ASN1 structure * @ider: vector that contains the DER encoding. * @len: number of bytes of *der: der[0]..der[len-1] - * Description: + * @errorDescription: null-terminated string contains details when an error occurred. * * Fill the structure *ELEMENT with values of a DER encoding string. The sructure must just be * created with function 'create_stucture'. @@ -1742,8 +1742,7 @@ asn1_der_decoding_startEnd(ASN1_TYPE element,const void *ider,int len, /** - * asn1_expand_any_defined_by - Expand every "ANY DEFINED BY" fields of - * structure *ELEMENT with the corresponding type. + * asn1_expand_any_defined_by - Expand "ANY DEFINED BY" fields in structure. * @definitions: ASN1 definitions * @element: pointer to an ASN1 structure * Description: @@ -1938,8 +1937,7 @@ asn1_expand_any_defined_by(ASN1_TYPE definitions,ASN1_TYPE *element) /** - * asn1_expand_octet_string - Expand an "OCTET STRING" fields of - * structure *ELEMENT with the corresponding type. + * asn1_expand_octet_string - Expand "OCTET STRING" fields in structure. * @definitions: ASN1 definitions * @element: pointer to an ASN1 structure * @octetName: name of the OCTECT STRING field to expand. diff --git a/lib/minitasn1/errors.c b/lib/minitasn1/errors.c index 1313bdfe99..17654f2cee 100644 --- a/lib/minitasn1/errors.c +++ b/lib/minitasn1/errors.c @@ -88,8 +88,11 @@ void libtasn1_perror(asn1_retCode error) * libtasn1_strerror - Returns a string with a description of an error * @error: is an error returned by a libtasn1 function. * - * This function is similar to strerror(). The only difference is that it - * accepts an error (number) returned by a libasn1 function. + * This function is similar to strerror(). The only difference is that it + * accepts an error (number) returned by a libasn1 function. + * + * Returns: Pointer to static zero-terminated string describing error + * code. **/ const char* libtasn1_strerror(asn1_retCode error) { diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h index 60d2e6d7e6..43ecef2de9 100644 --- a/lib/minitasn1/libtasn1.h +++ b/lib/minitasn1/libtasn1.h @@ -147,25 +147,30 @@ asn1_retCode asn1_delete_structure(ASN1_TYPE *structure); asn1_retCode asn1_delete_element(ASN1_TYPE structure,const char *element_name); -asn1_retCode asn1_write_value(ASN1_TYPE element,const char *name, - const void *value,int len); +asn1_retCode asn1_write_value(ASN1_TYPE *node_root,const char *name, + const void *ivalue,int len); -asn1_retCode asn1_read_value(ASN1_TYPE element,const char *name,void *value, - int *len); +asn1_retCode asn1_read_value(ASN1_TYPE *root,const char *name, + void* ivalue,int *len); asn1_retCode asn1_number_of_elements(ASN1_TYPE element,const char *name,int *num); asn1_retCode asn1_der_coding(ASN1_TYPE element,const char *name, - void *der,int *len,char *ErrorDescription); + void *ider,int *len, + char *ErrorDescription); -asn1_retCode asn1_der_decoding(ASN1_TYPE *element,const void *der,int len, - char *errorDescription); +asn1_retCode asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len, + char *errorDescription); -asn1_retCode asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName, - const void *der,int len,char *errorDescription); +asn1_retCode asn1_der_decoding_element(ASN1_TYPE *structure, + const char *elementName, + const void *ider,int len, + char *errorDescription); -asn1_retCode asn1_der_decoding_startEnd(ASN1_TYPE element,const void *der, - int len,const char *name,int *start, int *end); +asn1_retCode asn1_der_decoding_startEnd(ASN1_TYPE element, + const void *ider,int len, + const char *name_element, + int *start,int *end); asn1_retCode asn1_expand_any_defined_by(ASN1_TYPE definitions, ASN1_TYPE *element); diff --git a/lib/minitasn1/parser_aux.c b/lib/minitasn1/parser_aux.c index 8d827f5497..0ce68ca266 100644 --- a/lib/minitasn1/parser_aux.c +++ b/lib/minitasn1/parser_aux.c @@ -871,11 +871,13 @@ parse_version_string( const char *s, int *major, int *minor, int *micro ) * asn1_check_version - This function checks the library's version * @req_version: the version to check * - * Check that the version of the library is at minimum the requested one - * and return the version string; return NULL if the condition is not - * satisfied. If a NULL is passed to this function, no check is done, - * but the version string is simply returned. + * Check library version. * + * Return value: Check that the the version of the library is at + * minimum the one given as a string in @req_version and return the + * actual version string of the library; return NULL if the + * condition is not met. If %NULL is passed to this function no + * check is done and only the version string is returned. **/ const char * asn1_check_version( const char *req_version ) diff --git a/lib/minitasn1/structure.c b/lib/minitasn1/structure.c index bc92544228..9eda93373f 100644 --- a/lib/minitasn1/structure.c +++ b/lib/minitasn1/structure.c @@ -600,6 +600,9 @@ asn1_create_element(ASN1_TYPE definitions,const char *source_name, * @out: pointer to the output file (e.g. stdout). * @structure: pointer to the structure that you want to visit. * @name: an element of the structure + * @mode: specify how much of the structure to print, can be + * ASN1_PRINT_NAME, ASN1_PRINT_NAME_TYPE, + * ASN1_PRINT_NAME_TYPE_VALUE, or ASN1_PRINT_ALL. * * Prints on the standard output the structure's tree starting from the NAME element inside * the structure *POINTER. @@ -894,8 +897,7 @@ asn1_number_of_elements(ASN1_TYPE element,const char *name,int *num) /** - * asn1_find_structure_from_oid - Search the structure that is defined just - * after an OID definition. + * asn1_find_structure_from_oid - Locate structure defined by a specific OID. * @definitions: ASN1 definitions * @oidValue: value of the OID to search (e.g. "1.2.3.4"). * Description: |