diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/minitasn1/coding.c | 4 | ||||
-rw-r--r-- | lib/minitasn1/decoding.c | 40 | ||||
-rw-r--r-- | lib/minitasn1/element.c | 4 | ||||
-rw-r--r-- | lib/minitasn1/errors.c | 4 | ||||
-rw-r--r-- | lib/minitasn1/gstr.c | 5 | ||||
-rw-r--r-- | lib/minitasn1/int.h | 5 | ||||
-rw-r--r-- | lib/minitasn1/libtasn1.h | 7 | ||||
-rw-r--r-- | lib/minitasn1/parser_aux.c | 5 | ||||
-rw-r--r-- | lib/minitasn1/structure.c | 7 |
9 files changed, 36 insertions, 45 deletions
diff --git a/lib/minitasn1/coding.c b/lib/minitasn1/coding.c index a5f07f6449..11df3fc995 100644 --- a/lib/minitasn1/coding.c +++ b/lib/minitasn1/coding.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc. - * Copyright (C) 2002 Fabio Fiorina + * Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010 Free Software + * Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c index 4e623c41ab..da64510f0d 100644 --- a/lib/minitasn1/decoding.c +++ b/lib/minitasn1/decoding.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc. - * Copyright (C) 2002 Fabio Fiorina + * Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010 Free Software + * Foundation, Inc. * * This file is part of LIBTASN1. * @@ -288,20 +288,18 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len, leading = 1; for (k = 1; k < len; k++) { - + /* X.690 mandates that the leading byte must never be 0x80 */ - if (leading != 0 && der[len_len + k] == 0x80) - return ASN1_DER_ERROR; + if (leading != 0 && der[len_len + k] == 0x80) return ASN1_DER_ERROR; leading = 0; /* check for wrap around */ val = val << 7; val |= der[len_len + k] & 0x7F; - if (val < prev_val) - return ASN1_DER_ERROR; + if (val < prev_val) return ASN1_DER_ERROR; prev_val = val; @@ -315,7 +313,7 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len, } } *ret_len = len + len_len; - + return ASN1_SUCCESS; } @@ -808,8 +806,8 @@ _asn1_get_indefinite_length_string (const unsigned char *der, int *len) * error occurred. * * Fill the structure *ELEMENT with values of a DER encoding - * string. The sructure must just be created with function - * 'create_stucture'. If an error occurs during the decoding + * string. The structure must just be created with function + * 'asn1_create_element'. If an error occurs during the decoding * procedure, the *ELEMENT is deleted and set equal to * %ASN1_TYPE_EMPTY. * @@ -1056,9 +1054,8 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len, move = RIGHT; break; case TYPE_OBJECT_ID: - result = - _asn1_get_objectid_der (der + counter, len - counter, &len2, - temp, sizeof (temp)); + result = _asn1_get_objectid_der (der + counter, len - counter, &len2, + temp, sizeof (temp)); if (result != ASN1_SUCCESS) { asn1_delete_structure (element); @@ -1367,8 +1364,8 @@ asn1_der_decoding (ASN1_TYPE * element, const void *ider, int len, * error occurred. * * 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. The structure must just be created with function + * 'asn1_create_element'. The DER vector must contain the encoding * string of the whole STRUCTURE. If an error occurs during the * decoding procedure, the *STRUCTURE is deleted and set equal to * %ASN1_TYPE_EMPTY. @@ -1673,13 +1670,12 @@ asn1_der_decoding_element (ASN1_TYPE * structure, const char *elementName, case TYPE_OBJECT_ID: if (state == FOUND) { - result = - _asn1_get_objectid_der (der + counter, len - counter, - &len2, temp, sizeof (temp)); - if (result != ASN1_SUCCESS) - { - return result; - } + result = _asn1_get_objectid_der (der + counter, len - counter, &len2, + temp, sizeof (temp)); + if (result != ASN1_SUCCESS) + { + return result; + } tlen = strlen (temp); diff --git a/lib/minitasn1/element.c b/lib/minitasn1/element.c index df1470007d..09a6a9fb1d 100644 --- a/lib/minitasn1/element.c +++ b/lib/minitasn1/element.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc. - * Copyright (C) 2000, 2001, 2002, 2003 Fabio Fiorina + * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 + * Free Software Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/errors.c b/lib/minitasn1/errors.c index 86dec68d01..56d5f08dd7 100644 --- a/lib/minitasn1/errors.c +++ b/lib/minitasn1/errors.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. - * Copyright (C) 2002, 2005 Fabio Fiorina + * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010 Free Software + * Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/gstr.c b/lib/minitasn1/gstr.c index e08de14316..b3f6af27a1 100644 --- a/lib/minitasn1/gstr.c +++ b/lib/minitasn1/gstr.c @@ -1,7 +1,6 @@ /* - * Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, - * Inc. - * Copyright (C) 2002 Nikos Mavroyanopoulos + * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Free Software + * Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/int.h b/lib/minitasn1/int.h index bc583c4dde..def492759d 100644 --- a/lib/minitasn1/int.h +++ b/lib/minitasn1/int.h @@ -1,7 +1,6 @@ /* - * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software - * Foundation, Inc. - * Copyright (C) 2002 Fabio Fiorina + * Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free + * Software Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h index d108322cd2..ba80671159 100644 --- a/lib/minitasn1/libtasn1.h +++ b/lib/minitasn1/libtasn1.h @@ -1,7 +1,6 @@ /* - * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software - * Foundation, Inc. - * Copyright (C) 2002 Fabio Fiorina + * Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free + * Software Foundation, Inc. * * This file is part of LIBTASN1. * @@ -46,7 +45,7 @@ extern "C" { #endif -#define ASN1_VERSION "2.3" +#define ASN1_VERSION "2.4" typedef int asn1_retCode; /* type returned by libtasn1 functions */ diff --git a/lib/minitasn1/parser_aux.c b/lib/minitasn1/parser_aux.c index 6057813d8c..5ee2dee73c 100644 --- a/lib/minitasn1/parser_aux.c +++ b/lib/minitasn1/parser_aux.c @@ -1,7 +1,6 @@ /* - * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Free Software - * Foundation, Inc. - * Copyright (C) 2000,2001 Fabio Fiorina + * Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010 Free + * Software Foundation, Inc. * * This file is part of LIBTASN1. * diff --git a/lib/minitasn1/structure.c b/lib/minitasn1/structure.c index fc7d727cab..edaafe6603 100644 --- a/lib/minitasn1/structure.c +++ b/lib/minitasn1/structure.c @@ -1,7 +1,6 @@ /* - * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Free Software - * Foundation, Inc. - * Copyright (C) 2002 Fabio Fiorina + * Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free + * Software Foundation, Inc. * * This file is part of LIBTASN1. * @@ -671,7 +670,7 @@ _asn1_expand_identifier (ASN1_TYPE * node, ASN1_TYPE root) * Creates a structure of type @source_name. Example using * "pkix.asn": * - * rc = asn1_create_structure(cert_def, "PKIX1.Certificate", + * rc = asn1_create_element(cert_def, "PKIX1.Certificate", * certptr); * * Returns: |