diff options
author | Simon Josefsson <simon@josefsson.org> | 2004-10-28 20:55:36 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2004-10-28 20:55:36 +0000 |
commit | 76d70514f9053d3cde722a89404eb1d2f7267780 (patch) | |
tree | ee88df695cf63c365e09cf1a9dc742d550ea8723 | |
parent | 86c2658de98b79b37c45d45bd99a2e92f0a7cad6 (diff) | |
download | gnutls-76d70514f9053d3cde722a89404eb1d2f7267780.tar.gz |
Doc fixes, from Martijn Koster <mak@greenhills.co.uk>.
-rw-r--r-- | lib/minitasn1/coding.c | 39 | ||||
-rw-r--r-- | lib/minitasn1/decoding.c | 28 | ||||
-rw-r--r-- | lib/minitasn1/element.c | 14 | ||||
-rw-r--r-- | lib/minitasn1/errors.c | 1 | ||||
-rw-r--r-- | lib/minitasn1/errors.h | 6 | ||||
-rw-r--r-- | lib/minitasn1/errors_int.h | 2 | ||||
-rw-r--r-- | lib/minitasn1/gstr.c | 13 | ||||
-rw-r--r-- | lib/minitasn1/gstr.h | 1 | ||||
-rw-r--r-- | lib/minitasn1/int.h | 8 | ||||
-rw-r--r-- | lib/minitasn1/libtasn1.h | 15 | ||||
-rw-r--r-- | lib/minitasn1/parser_aux.c | 16 |
11 files changed, 40 insertions, 103 deletions
diff --git a/lib/minitasn1/coding.c b/lib/minitasn1/coding.c index 4f3c575126..1503f6a08b 100644 --- a/lib/minitasn1/coding.c +++ b/lib/minitasn1/coding.c @@ -63,7 +63,7 @@ _asn1_error_description_value_not_found(node_asn *node,char *ErrorDescription) /* Parameters: */ /* len: value to convert. */ /* ans: string returned. */ -/* ans_len: number of meanful bytes of ANS */ +/* ans_len: number of meaningful bytes of ANS */ /* (ans[0]..ans[ans_len-1]). */ /* Return: */ /******************************************************/ @@ -101,7 +101,7 @@ _asn1_length_der(unsigned long len,unsigned char *ans,int *ans_len) /* class: value to convert. */ /* tag_value: value to convert. */ /* ans: string returned. */ -/* ans_len: number of meanful bytes of ANS */ +/* ans_len: number of meaningful bytes of ANS */ /* (ans[0]..ans[ans_len-1]). */ /* Return: */ /******************************************************/ @@ -138,7 +138,7 @@ _asn1_tag_der(unsigned char class,unsigned int tag_value,unsigned char *ans,int /* str: OCTET string. */ /* str_len: STR length (str[0]..str[str_len-1]). */ /* der: string returned. */ -/* der_len: number of meanful bytes of DER */ +/* der_len: number of meaningful bytes of DER */ /* (der[0]..der[ans_len-1]). */ /* Return: */ /******************************************************/ @@ -160,7 +160,7 @@ _asn1_octet_der(const unsigned char *str,int str_len,unsigned char *der,int *der /* Parameters: */ /* str: TIME null-terminated string. */ /* der: string returned. */ -/* der_len: number of meanful bytes of DER */ +/* der_len: number of meaningful bytes of DER */ /* (der[0]..der[ans_len-1]). Initially it */ /* if must store the lenght of DER. */ /* Return: */ @@ -229,9 +229,9 @@ _asn1_get_utctime_der(unsigned char *der,int *der_len,unsigned char *str) /* Parameters: */ /* str: OBJECT IDENTIFIER null-terminated string. */ /* der: string returned. */ -/* der_len: number of meanful bytes of DER */ +/* der_len: number of meaningful bytes of DER */ /* (der[0]..der[ans_len-1]). Initially it */ -/* if must store the lenght of DER. */ +/* must store the length of DER. */ /* Return: */ /* ASN1_MEM_ERROR when DER isn't big enough */ /* ASN1_SUCCESS otherwise */ @@ -305,9 +305,9 @@ char bit_mask[]={0xFF,0xFE,0xFC,0xF8,0xF0,0xE0,0xC0,0x80}; /* STRING type (length and pad included). */ /* Parameters: */ /* str: BIT string. */ -/* bit_len: number of meanful bits in STR. */ +/* bit_len: number of meaningful bits in STR. */ /* der: string returned. */ -/* der_len: number of meanful bytes of DER */ +/* der_len: number of meaningful bytes of DER */ /* (der[0]..der[ans_len-1]). */ /* Return: */ /******************************************************/ @@ -336,7 +336,7 @@ _asn1_bit_der(const unsigned char *str,int bit_len,unsigned char *der,int *der_l /* Parameters: */ /* node: pointer to the tree element. */ /* der: string with the DER coding of the whole tree*/ -/* counter: number of meanful bytes of DER */ +/* counter: number of meaningful bytes of DER */ /* (der[0]..der[*counter-1]). */ /* max_len: size of der vector */ /* Return: */ @@ -356,7 +356,7 @@ _asn1_complete_explicit_tag(node_asn *node,unsigned char *der,int *counter,int * p=node->down; /* When there are nested tags we must complete them reverse to the order they were created. This is because completing a tag - modifies alla date within it, including the incomplete tags + modifies all data within it, including the incomplete tags which store buffer positions -- simon@josefsson.org 2002-09-06 */ while(p->right) @@ -398,7 +398,7 @@ _asn1_complete_explicit_tag(node_asn *node,unsigned char *der,int *counter,int * /* Parameters: */ /* node: pointer to the tree element. */ /* der: string returned */ -/* counter: number of meanful bytes of DER */ +/* counter: number of meaningful bytes of DER */ /* (counter[0]..der[*counter-1]). */ /* max_len: size of der vector */ /* Return: */ @@ -572,7 +572,7 @@ _asn1_ordering_set(unsigned char *der,node_asn *node) p_vet->value=(class<<24)|tag; counter+=len2; - /* extraction and length */ + /* extraction and length */ len2=_asn1_get_length_der(der+counter,&len); counter+=len+len2; @@ -976,18 +976,3 @@ asn1_der_coding(ASN1_TYPE element,const char *name,void *ider,int *len, return ASN1_SUCCESS; } - - - - - - - - - - - - - - - diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c index b99da9f098..714e65674b 100644 --- a/lib/minitasn1/decoding.c +++ b/lib/minitasn1/decoding.c @@ -64,7 +64,7 @@ _asn1_get_length_der(const unsigned char *der,int *len) ans=0; while(punt<=k) ans=ans*256+der[punt++]; } - else{ /* indefinite lenght method */ + else{ /* indefinite length method */ ans=-1; } @@ -496,7 +496,7 @@ _asn1_get_indefinite_length_string(const unsigned char* der,int* len) * * Fill the structure *ELEMENT with values of a DER encoding string. The sructure must just be * created with function 'create_stucture'. - * If an error accurs during de decoding procedure, the *ELEMENT is deleted + * If an error occurs during the decoding procedure, the *ELEMENT is deleted * and set equal to ASN1_TYPE_EMPTY. * * Returns: @@ -833,7 +833,7 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len, counter+=len2+len3; } else{ /* indefinite length */ - /* Check indefinite lenth method in a EXPLICIT TAG */ + /* Check indefinite lenth method in an EXPLICIT TAG */ if((p->type&CONST_TAG) && (der[counter-1]==0x80)) indefinite=1; else @@ -858,7 +858,7 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len, counter+=len2; /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with - a indefinite length method. */ + an indefinite length method. */ if(indefinite){ if(!der[counter] && !der[counter+1]){ counter+=2; @@ -912,14 +912,14 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len, * @elementName: name of the element to fill * @ider: vector that contains the DER encoding of the whole structure. * @len: number of bytes of *der: der[0]..der[len-1] - * @errorDescription: null-terminated string contains details when an arror accured. + * @errorDescription: null-terminated string contains details when an error occurred. * * Description: * * Fill the element named ELEMENTNAME with values of a DER encoding string. * The sructure must just be created with function 'create_stucture'. * The DER vector must contain the encoding string of the whole STRUCTURE. - * If an error accurs during the decoding procedure, the *STRUCTURE is deleted + * If an error occurs during the decoding procedure, the *STRUCTURE is deleted * and set equal to ASN1_TYPE_EMPTY. * * Returns: @@ -958,7 +958,7 @@ asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName, return ASN1_GENERIC_ERROR; } - if((*structure)->name){ /* Has *structure a name? */ + if((*structure)->name){ /* Has *structure got a name? */ nameLen-=strlen((*structure)->name); if(nameLen>0) strcpy(currentName,(*structure)->name); else{ @@ -1335,7 +1335,7 @@ asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName, counter+=len2+len3; } else{ /* indefinite length */ - /* Check indefinite lenth method in a EXPLICIT TAG */ + /* Check indefinite lenth method in an EXPLICIT TAG */ if((p->type&CONST_TAG) && (der[counter-1]==0x80)) indefinite=1; else @@ -1366,7 +1366,7 @@ asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName, counter+=len2; /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with - a indefinite length method. */ + an indefinite length method. */ if(indefinite){ if(!der[counter] && !der[counter+1]){ counter+=2; @@ -1690,7 +1690,7 @@ asn1_der_decoding_startEnd(ASN1_TYPE element,const void *ider,int len, counter+=len2+len4+len3; } else{ /* indefinite length */ - /* Check indefinite lenth method in a EXPLICIT TAG */ + /* Check indefinite lenth method in an EXPLICIT TAG */ if((p->type&CONST_TAG) && (der[counter-1]==0x80)) indefinite=1; else @@ -1703,7 +1703,7 @@ asn1_der_decoding_startEnd(ASN1_TYPE element,const void *ider,int len, counter+=len2; /* Check if a couple of 0x00 are present due to an EXPLICIT TAG with - a indefinite length method. */ + an indefinite length method. */ if(indefinite){ if(!der[counter] && !der[counter+1]) counter+=2; @@ -2070,9 +2070,3 @@ asn1_expand_octet_string(ASN1_TYPE definitions,ASN1_TYPE *element, return retCode; } - - - - - - diff --git a/lib/minitasn1/element.c b/lib/minitasn1/element.c index 36f9248e7c..12792dbf17 100644 --- a/lib/minitasn1/element.c +++ b/lib/minitasn1/element.c @@ -99,7 +99,7 @@ _asn1_convert_integer(const char *value,unsigned char *value_out,int value_out_s *len=SIZEOF_UNSIGNED_LONG_INT-k; if (SIZEOF_UNSIGNED_LONG_INT-k> value_out_size) - /* VALUE_OUT is too short to contain the value convertion */ + /* VALUE_OUT is too short to contain the value conversion */ return ASN1_MEM_ERROR; for(k2=k;k2<SIZEOF_UNSIGNED_LONG_INT;k2++) @@ -204,10 +204,10 @@ _asn1_append_sequence_set(node_asn *node) * value="2001010112001.12-0700" , len=1 -> time=Jannuary 1st, 2001 at 12h 00m 01.12s * Pacific Daylight Time * - * \item OCTET STRING\: VALUE contains the octet string and LEN is the number of octet. + * \item OCTET STRING\: VALUE contains the octet string and LEN is the number of octets. * value="$\backslash$x01$\backslash$x02$\backslash$x03" , len=3 -> three bytes octet string * - * \item GeneralString\: VALUE contains the generalstring and LEN is the number of octet. + * \item GeneralString\: VALUE contains the generalstring and LEN is the number of octets. * value="$\backslash$x01$\backslash$x02$\backslash$x03" , len=3 -> three bytes generalstring * * \item BIT STRING\: VALUE contains the bit string organized by bytes and LEN is the number of bits. @@ -576,9 +576,9 @@ asn1_write_value(node_asn *node_root,const char *name, * \item GeneralizedTime\: VALUE will be a null terminated string in the same format used to set * the value * - * \item OCTET STRING\: VALUE will contain the octet string and LEN will be the number of octet. + * \item OCTET STRING\: VALUE will contain the octet string and LEN will be the number of octets. * - * \item GeneralString\: VALUE will contain the generalstring and LEN will be the number of octet. + * \item GeneralString\: VALUE will contain the generalstring and LEN will be the number of octets. * * \item BIT STRING\: VALUE will contain the bit string organized by bytes and LEN will be the * number of bits. @@ -811,7 +811,3 @@ asn1_read_tag(node_asn *root,const char *name,int *tagValue, int *classValue) return ASN1_SUCCESS; } - - - - diff --git a/lib/minitasn1/errors.c b/lib/minitasn1/errors.c index 70f38cb3a8..1313bdfe99 100644 --- a/lib/minitasn1/errors.c +++ b/lib/minitasn1/errors.c @@ -126,4 +126,3 @@ void _libtasn1_log( const char *fmt, ...) { void _libtasn1_null_log( void* x, ...) { return; } # endif /* C99_MACROS */ #endif /* DEBUG */ - diff --git a/lib/minitasn1/errors.h b/lib/minitasn1/errors.h index 38395f619f..478ebecb2a 100644 --- a/lib/minitasn1/errors.h +++ b/lib/minitasn1/errors.h @@ -58,9 +58,3 @@ void _libtasn1_null_log( void*, ...); #endif /* DEBUG */ #endif /* ERRORS_H */ - - - - - - diff --git a/lib/minitasn1/errors_int.h b/lib/minitasn1/errors_int.h index 6d2706f088..e05d6864be 100644 --- a/lib/minitasn1/errors_int.h +++ b/lib/minitasn1/errors_int.h @@ -20,5 +20,3 @@ #define ASN1_NAME_TOO_LONG 15 #define ASN1_ARRAY_ERROR 16 #define ASN1_ELEMENT_NOT_EMPTY 17 - - diff --git a/lib/minitasn1/gstr.c b/lib/minitasn1/gstr.c index d8c83a1630..918ab4dd07 100644 --- a/lib/minitasn1/gstr.c +++ b/lib/minitasn1/gstr.c @@ -21,7 +21,7 @@ #include <int.h> /* These function are like strcat, strcpy. They only - * do bound checking (they shouldn't cause buffer overruns), + * do bounds checking (they shouldn't cause buffer overruns), * and they always produce null terminated strings. * * They should be used only with null terminated strings. @@ -64,14 +64,3 @@ void _asn1_mem_cpy( char* dest, size_t dest_tot_size, const char* src, size_t sr } } } - - - - - - - - - - - diff --git a/lib/minitasn1/gstr.h b/lib/minitasn1/gstr.h index 62b86e79d3..ad3a5d4bfd 100644 --- a/lib/minitasn1/gstr.h +++ b/lib/minitasn1/gstr.h @@ -4,4 +4,3 @@ void _asn1_str_cat( char* dest, size_t dest_tot_size, const char* src); #define Estrcpy(x,y) _asn1_str_cpy(x,MAX_ERROR_DESCRIPTION_SIZE,y) #define Estrcat(x,y) _asn1_str_cat(x,MAX_ERROR_DESCRIPTION_SIZE,y) - diff --git a/lib/minitasn1/int.h b/lib/minitasn1/int.h index 04297b77f6..3c9179f521 100644 --- a/lib/minitasn1/int.h +++ b/lib/minitasn1/int.h @@ -39,7 +39,7 @@ #define MAX16 65535 #define MAX_LOG_SIZE 1024 /* maximum number of characters of a log message */ -#define MAX_NAME_SIZE 128 /* maximum number of characters of a name inside an ASN1 file definitons */ +#define MAX_NAME_SIZE 128 /* maximum number of characters of a name inside an ASN1 file definiton */ #define MAX_ERROR_DESCRIPTION_SIZE 128 /* maximum number of characters of a description message */ /*****************************************/ @@ -79,7 +79,7 @@ typedef int asn1_retCode; /* type returned by libasn1 functions */ /******************************************************/ /* Structure definition used for the node of the tree */ -/* that rappresent an ASN.1 DEFINITION. */ +/* that represent an ASN.1 DEFINITION. */ /******************************************************/ typedef struct node_asn_struct{ char *name; /* Node name */ @@ -136,7 +136,7 @@ typedef struct static_struct_asn ASN1_ARRAY_TYPE; /***********************************************************************/ -/* List of constants for specify better the type of typedef node_asn. */ +/* List of constants to better specify the type of typedef node_asn. */ /***********************************************************************/ /* Used with TYPE_TAG */ #define CONST_UNIVERSAL (1<<8) @@ -195,5 +195,3 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len, #endif /* INT_H */ - - diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h index 8d460b101e..60d2e6d7e6 100644 --- a/lib/minitasn1/libtasn1.h +++ b/lib/minitasn1/libtasn1.h @@ -100,7 +100,7 @@ typedef int asn1_retCode; /* type returned by libasn1 functions */ /******************************************************/ /* Structure definition used for the node of the tree */ -/* that rappresent an ASN.1 DEFINITION. */ +/* that represent an ASN.1 DEFINITION. */ /******************************************************/ typedef struct node_asn_struct{ char *name; /* Node name */ @@ -190,16 +190,3 @@ void libtasn1_perror(asn1_retCode error); #endif #endif /* LIBASN1_H */ - - - - - - - - - - - - - diff --git a/lib/minitasn1/parser_aux.c b/lib/minitasn1/parser_aux.c index 6f33563fae..8d827f5497 100644 --- a/lib/minitasn1/parser_aux.c +++ b/lib/minitasn1/parser_aux.c @@ -91,7 +91,7 @@ _asn1_add_node(unsigned int type) /* Parameters: */ /* pointer: NODE_ASN element pointer. */ /* name: null terminated string with the element's name to find.*/ -/* Return: the searching result. NULL if not find. */ +/* Return: the searching result. NULL if not found. */ /******************************************************************/ node_asn * _asn1_find_node(node_asn *pointer,const char *name) @@ -107,7 +107,7 @@ _asn1_find_node(node_asn *pointer,const char *name) p=pointer; n_start=name; - if(p->name != NULL){ /* has *pointer a name ? */ + if(p->name != NULL){ /* has *pointer got a name ? */ n_end=strchr(n_start,'.'); /* search the first dot */ if(n_end){ memcpy(n,n_start,n_end-n_start); @@ -171,7 +171,7 @@ _asn1_find_node(node_asn *pointer,const char *name) /******************************************************************/ /* Function : _asn1_set_value */ /* Description: sets the field VALUE in a NODE_ASN element. The */ -/* previus value (if exist) will be lost */ +/* previous value (if exist) will be lost */ /* Parameters: */ /* node: element pointer. */ /* value: pointer to the value that you want to set. */ @@ -198,7 +198,7 @@ _asn1_set_value(node_asn *node,const unsigned char *value,unsigned int len) /******************************************************************/ /* Function : _asn1_set_name */ /* Description: sets the field NAME in a NODE_ASN element. The */ -/* previus value (if exist) will be lost */ +/* previous value (if exist) will be lost */ /* Parameters: */ /* node: element pointer. */ /* name: a null terminated string with the name that you want */ @@ -788,9 +788,9 @@ _asn1_check_identifier(ASN1_TYPE node) /* Parameters: */ /* node: pointer to a DEFINITIONS element. */ /* Return: */ -/* ASN1_ELEMENT_NOT_FOUND if NODE is NULL or not a pointer to */ +/* ASN1_ELEMENT_NOT_FOUND if NODE is NULL or not a pointer to */ /* a DEFINITIONS element, */ -/* otherwise ASN1_SUCCESS */ +/* otherwise ASN1_SUCCESS */ /******************************************************************/ asn1_retCode _asn1_set_default_tag(ASN1_TYPE node) @@ -871,7 +871,7 @@ 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 the version of the library is at minimum the requested one + * 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. @@ -907,5 +907,3 @@ asn1_check_version( const char *req_version ) } return NULL; } - - |