platform/upstream/libtasn1.git
10 years agoUse the new functions in asn1_decoding_element()
Nikos Mavrogiannopoulos [Sat, 17 May 2014 06:10:32 +0000 (08:10 +0200)]
Use the new functions in asn1_decoding_element()

10 years agoRevert "asn1_der_decoding_element is just an alias of asn1_der_decoding()."
Nikos Mavrogiannopoulos [Sat, 17 May 2014 06:08:25 +0000 (08:08 +0200)]
Revert "asn1_der_decoding_element is just an alias of asn1_der_decoding()."

This reverts commit a8866ebf9a62386bd24f107e8384bbbf032baa52.

10 years agomade _asn1_ltostr() safer.
Nikos Mavrogiannopoulos [Sat, 17 May 2014 06:08:15 +0000 (08:08 +0200)]
made _asn1_ltostr() safer.

10 years agosafer usage of memcpy().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 22:21:25 +0000 (00:21 +0200)]
safer usage of memcpy().

10 years agocheck for zero size in time and object ids.
Nikos Mavrogiannopoulos [Fri, 16 May 2014 22:06:01 +0000 (00:06 +0200)]
check for zero size in time and object ids.

10 years agoAllow for zero strings.
Nikos Mavrogiannopoulos [Fri, 16 May 2014 22:03:58 +0000 (00:03 +0200)]
Allow for zero strings.

10 years agosimplify ltostr()
Nikos Mavrogiannopoulos [Fri, 16 May 2014 21:48:27 +0000 (23:48 +0200)]
simplify ltostr()

10 years agodoc update
Nikos Mavrogiannopoulos [Fri, 16 May 2014 20:39:49 +0000 (22:39 +0200)]
doc update

10 years agoDo not return illegal values in asn1_get_bit_der().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 20:10:08 +0000 (22:10 +0200)]
Do not return illegal values in asn1_get_bit_der().

10 years agoreturn the correct error code in asn1_read_value_type()
Nikos Mavrogiannopoulos [Fri, 16 May 2014 19:54:58 +0000 (21:54 +0200)]
return the correct error code in asn1_read_value_type()

10 years agoremoved debug definition
Nikos Mavrogiannopoulos [Fri, 16 May 2014 17:36:19 +0000 (19:36 +0200)]
removed debug definition

10 years agodoc update
Nikos Mavrogiannopoulos [Fri, 16 May 2014 17:27:03 +0000 (19:27 +0200)]
doc update

10 years agouse DECR_LEN() in _asn1_get_indefinite_length_string().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 17:25:53 +0000 (19:25 +0200)]
use DECR_LEN() in _asn1_get_indefinite_length_string().

10 years agouse DECR_LEN in _asn1_get_octet_string()
Nikos Mavrogiannopoulos [Fri, 16 May 2014 17:21:37 +0000 (19:21 +0200)]
use DECR_LEN in _asn1_get_octet_string()

10 years agoFixes in _asn1_extract_der_octet() and usage of DECR_LEN().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 17:16:09 +0000 (19:16 +0200)]
Fixes in _asn1_extract_der_octet() and usage of DECR_LEN().

10 years agouse DECR_LEN() in _asn1_extract_tag_der()
Nikos Mavrogiannopoulos [Fri, 16 May 2014 17:02:46 +0000 (19:02 +0200)]
use DECR_LEN() in _asn1_extract_tag_der()

10 years agosimplified check for indefinite.
Nikos Mavrogiannopoulos [Fri, 16 May 2014 17:00:04 +0000 (19:00 +0200)]
simplified check for indefinite.

10 years agoexpanded usage of DECR_LEN().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 16:21:08 +0000 (18:21 +0200)]
expanded usage of DECR_LEN().

10 years agosimplified _asn1_get_octet_string().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 16:07:52 +0000 (18:07 +0200)]
simplified _asn1_get_octet_string().

10 years agosimplified _asn1_get_indefinite_length_string()
Nikos Mavrogiannopoulos [Fri, 16 May 2014 16:05:44 +0000 (18:05 +0200)]
simplified _asn1_get_indefinite_length_string()

10 years agoMore precise tracking of data.
Nikos Mavrogiannopoulos [Fri, 16 May 2014 16:02:32 +0000 (18:02 +0200)]
More precise tracking of data.

10 years agoasn1_der_decoding_element is just an alias of asn1_der_decoding().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 09:04:35 +0000 (11:04 +0200)]
asn1_der_decoding_element is just an alias of asn1_der_decoding().

This eliminates the need of massive code duplication.

10 years agoMore precise length check in _asn1_get_indefinite_length_string().
Nikos Mavrogiannopoulos [Fri, 16 May 2014 06:08:02 +0000 (08:08 +0200)]
More precise length check in _asn1_get_indefinite_length_string().

10 years agoUse the correct max length definition.
Nikos Mavrogiannopoulos [Fri, 16 May 2014 05:18:26 +0000 (07:18 +0200)]
Use the correct max length definition.

10 years agocleaned up a bit _asn1_remove_node().
Nikos Mavrogiannopoulos [Sat, 10 May 2014 11:53:01 +0000 (13:53 +0200)]
cleaned up a bit _asn1_remove_node().

10 years agoprevent memset() from being optimized out.
Nikos Mavrogiannopoulos [Sat, 10 May 2014 11:49:32 +0000 (13:49 +0200)]
prevent memset() from being optimized out.

10 years agodoc update
Nikos Mavrogiannopoulos [Mon, 5 May 2014 14:46:48 +0000 (16:46 +0200)]
doc update

10 years agoCorrected an off-by-one error.
Nikos Mavrogiannopoulos [Sat, 3 May 2014 20:45:32 +0000 (22:45 +0200)]
Corrected an off-by-one error.

The issue was discovered using the codenomicon TLS suite.

10 years agoAdded stable mark
Nikos Mavrogiannopoulos [Fri, 2 May 2014 12:49:03 +0000 (14:49 +0200)]
Added stable mark

10 years agobumped version
Nikos Mavrogiannopoulos [Thu, 1 May 2014 21:07:23 +0000 (23:07 +0200)]
bumped version

10 years agobumped version
Nikos Mavrogiannopoulos [Thu, 1 May 2014 20:58:21 +0000 (22:58 +0200)]
bumped version

10 years agoUse the smallest of the 2 lengths for the comparison
Kurt Roeckx [Thu, 1 May 2014 12:15:54 +0000 (14:15 +0200)]
Use the smallest of the 2 lengths for the comparison

We're sorting 2 strings here based on X.690 section 11.6 and 6.3

10 years agoAdded minmax gnulib module.
Nikos Mavrogiannopoulos [Mon, 28 Apr 2014 14:11:47 +0000 (16:11 +0200)]
Added minmax gnulib module.

10 years agomore files to ignore
Nikos Mavrogiannopoulos [Mon, 28 Apr 2014 14:11:27 +0000 (16:11 +0200)]
more files to ignore

10 years agoMake asn1_ordering_set_of() return error if it can't find data for one of the entries.
Kurt Roeckx [Sat, 26 Apr 2014 16:10:31 +0000 (18:10 +0200)]
Make asn1_ordering_set_of() return error if it can't find data for one of the entries.

10 years agoCheck that p is not NULL
Kurt Roeckx [Sat, 26 Apr 2014 16:10:32 +0000 (18:10 +0200)]
Check that p is not NULL

As far as I can tell this should never happen.

10 years agoupdated bison file
Nikos Mavrogiannopoulos [Sun, 27 Apr 2014 16:20:27 +0000 (18:20 +0200)]
updated bison file

10 years agoundid optimization in patch 057193dcc2089520ab36d95f42d12f4ffd8127b5
Nikos Mavrogiannopoulos [Sat, 26 Apr 2014 10:47:00 +0000 (12:47 +0200)]
undid optimization in patch 057193dcc2089520ab36d95f42d12f4ffd8127b5

10 years agoAdded test that decodes and re-encodes a DER CRL.
Nikos Mavrogiannopoulos [Sat, 26 Apr 2014 09:58:01 +0000 (11:58 +0200)]
Added test that decodes and re-encodes a DER CRL.

10 years agodoc update
Nikos Mavrogiannopoulos [Mon, 21 Apr 2014 22:46:53 +0000 (00:46 +0200)]
doc update

10 years agoFix memory leak.
Kurt Roeckx [Sun, 20 Apr 2014 14:50:03 +0000 (16:50 +0200)]
Fix memory leak.

10 years ago_asn1_ordering_*(): Fix memory leak in case of error
Kurt Roeckx [Sun, 20 Apr 2014 14:50:02 +0000 (16:50 +0200)]
_asn1_ordering_*(): Fix memory leak in case of error

10 years agoMake _asn1_ordering_* return error values and check them.
Kurt Roeckx [Sun, 20 Apr 2014 14:50:01 +0000 (16:50 +0200)]
Make _asn1_ordering_* return error values and check them.

10 years agoCall ordering functions with the right length
Kurt Roeckx [Sun, 20 Apr 2014 14:50:00 +0000 (16:50 +0200)]
Call ordering functions with the right length

We're going to insert the length of the set and at this point are going to order
it.  But we called it with the wrong length.  Also updates the check to only do
it when the buffer isn't to small.

10 years agoFix syntax-check nits.
Simon Josefsson [Tue, 22 Apr 2014 19:16:17 +0000 (21:16 +0200)]
Fix syntax-check nits.

10 years agoUpdate copyright years.
Simon Josefsson [Tue, 22 Apr 2014 19:02:23 +0000 (21:02 +0200)]
Update copyright years.

10 years agoUpdate gnulib files.
Simon Josefsson [Tue, 22 Apr 2014 18:50:00 +0000 (20:50 +0200)]
Update gnulib files.

10 years agodoc update
Nikos Mavrogiannopoulos [Thu, 17 Apr 2014 13:43:30 +0000 (15:43 +0200)]
doc update

10 years agosimplified asn1_find_structure_from_oid() and asn1_expand_any_defined_by().
Nikos Mavrogiannopoulos [Thu, 17 Apr 2014 13:36:11 +0000 (15:36 +0200)]
simplified asn1_find_structure_from_oid() and asn1_expand_any_defined_by().

10 years agodoc update
Nikos Mavrogiannopoulos [Tue, 15 Apr 2014 12:30:45 +0000 (14:30 +0200)]
doc update

10 years agoDo not try to write over null values
Nikos Mavrogiannopoulos [Tue, 15 Apr 2014 11:49:40 +0000 (13:49 +0200)]
Do not try to write over null values

10 years agofixed several coverity reported bugs.
Nikos Mavrogiannopoulos [Tue, 15 Apr 2014 10:12:06 +0000 (12:12 +0200)]
fixed several coverity reported bugs.

10 years agodoc update
Nikos Mavrogiannopoulos [Fri, 28 Mar 2014 13:49:58 +0000 (14:49 +0100)]
doc update

10 years agoasn1_write_value: fix segfault when deleting an unauthorized element
Jean-Louis Thekekara [Tue, 25 Mar 2014 16:15:58 +0000 (17:15 +0100)]
asn1_write_value: fix segfault when deleting an unauthorized element

Segfaults can occur, since value is dereferenced later, ex:

 352       if ((isdigit (value[0])) || (value[0] == '-')

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
10 years agocleaned up code
Nikos Mavrogiannopoulos [Fri, 28 Mar 2014 13:45:33 +0000 (14:45 +0100)]
cleaned up code

10 years agoasn1_write_value: allow SET_OF elements deletion
Jean-Louis Thekekara [Tue, 25 Mar 2014 12:41:37 +0000 (13:41 +0100)]
asn1_write_value: allow SET_OF elements deletion

SET_OF elements could just be deleted as SEQUENCE_OF ones.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
10 years agoextract_tag_der_recursive: fix compilation errors
Jean-Louis Thekekara [Tue, 25 Mar 2014 13:16:39 +0000 (14:16 +0100)]
extract_tag_der_recursive: fix compilation errors

Fix the following errors introduced by extract_tag_der_recursive usage:

decoding.c: In function 'extract_tag_der_recursive':
decoding.c:560:5: error: 'ris' may be used uninitialized in this function [-Werror=maybe-uninitialized]

decoding.c: In function 'asn1_der_decoding_startEnd':
decoding.c:2192:40: error: unused variable 'p3' [-Werror=unused-variable]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
10 years agocorrected delete_unneeded_choice_fields().
Nikos Mavrogiannopoulos [Fri, 14 Mar 2014 14:27:21 +0000 (15:27 +0100)]
corrected delete_unneeded_choice_fields().

10 years agofree all allocated memory
Nikos Mavrogiannopoulos [Fri, 14 Mar 2014 14:19:19 +0000 (15:19 +0100)]
free all allocated memory

10 years agodoc update
Nikos Mavrogiannopoulos [Fri, 14 Mar 2014 14:09:56 +0000 (15:09 +0100)]
doc update

10 years agoAdded self-check for recursive choices.
Nikos Mavrogiannopoulos [Fri, 14 Mar 2014 14:09:11 +0000 (15:09 +0100)]
Added self-check for recursive choices.

10 years agoHandle recursive CHOICEs.
Nikos Mavrogiannopoulos [Fri, 14 Mar 2014 14:02:15 +0000 (15:02 +0100)]
Handle recursive CHOICEs.

10 years agoUse special function for common usage of _asn1_extract_tag_der().
Nikos Mavrogiannopoulos [Fri, 14 Mar 2014 13:07:42 +0000 (14:07 +0100)]
Use special function for common usage of _asn1_extract_tag_der().

10 years agodistribute stamp_docs to avoid regenerating docs everywhere.
Nikos Mavrogiannopoulos [Wed, 27 Nov 2013 13:28:03 +0000 (14:28 +0100)]
distribute stamp_docs to avoid regenerating docs everywhere.

10 years agocorrected so-number
Nikos Mavrogiannopoulos [Mon, 25 Nov 2013 19:25:07 +0000 (20:25 +0100)]
corrected so-number

10 years agodoc update
Nikos Mavrogiannopoulos [Mon, 25 Nov 2013 19:18:05 +0000 (20:18 +0100)]
doc update

10 years agoinclude asn1_delete_structure2() to tests
Nikos Mavrogiannopoulos [Mon, 25 Nov 2013 19:12:38 +0000 (20:12 +0100)]
include asn1_delete_structure2() to tests

10 years agoexported function
Nikos Mavrogiannopoulos [Mon, 25 Nov 2013 19:12:19 +0000 (20:12 +0100)]
exported function

10 years agoThe parser accepts negative numbers in INTEGER ranges. Use snprintf() instead of...
Nikos Mavrogiannopoulos [Thu, 21 Nov 2013 08:02:17 +0000 (09:02 +0100)]
The parser accepts negative numbers in INTEGER ranges. Use snprintf() instead of strcpy() in parser.

11 years agoAdded asn1_delete_structure2().
Nikos Mavrogiannopoulos [Wed, 13 Nov 2013 12:55:14 +0000 (13:55 +0100)]
Added asn1_delete_structure2().

The new function accepts additional flags to be used during deinitialization.
For the moment the only available flag is ASN1_DELETE_FLAG_ZEROIZE which zeroizes
all values in the structure prior to deinitialization.

11 years agoupdated documentation generation rules.
Nikos Mavrogiannopoulos [Wed, 13 Nov 2013 12:45:41 +0000 (13:45 +0100)]
updated documentation generation rules.

11 years agoupdated gdoc from gnutls
Nikos Mavrogiannopoulos [Wed, 13 Nov 2013 12:34:51 +0000 (13:34 +0100)]
updated gdoc from gnutls

11 years agoupdated ASN1.c
Nikos Mavrogiannopoulos [Wed, 13 Nov 2013 12:34:29 +0000 (13:34 +0100)]
updated ASN1.c

11 years agodoc fixes
Nikos Mavrogiannopoulos [Wed, 13 Nov 2013 12:34:22 +0000 (13:34 +0100)]
doc fixes

11 years agoBump version.
Simon Josefsson [Sun, 24 Mar 2013 10:52:44 +0000 (11:52 +0100)]
Bump version.

11 years agoFix syntax-check warnings.
Simon Josefsson [Sun, 24 Mar 2013 10:00:19 +0000 (11:00 +0100)]
Fix syntax-check warnings.

11 years agoBump versions.
Simon Josefsson [Sun, 24 Mar 2013 09:59:52 +0000 (10:59 +0100)]
Bump versions.

11 years agoFix syntax-check warnings.
Simon Josefsson [Sun, 24 Mar 2013 09:54:53 +0000 (10:54 +0100)]
Fix syntax-check warnings.

11 years agoGenerated.
Simon Josefsson [Sun, 24 Mar 2013 09:41:52 +0000 (10:41 +0100)]
Generated.

11 years agoBump version.
Simon Josefsson [Sun, 24 Mar 2013 09:41:44 +0000 (10:41 +0100)]
Bump version.

11 years agoUpdate copyright years.
Simon Josefsson [Sun, 24 Mar 2013 09:33:24 +0000 (10:33 +0100)]
Update copyright years.

11 years agoVersion 3.3.
Simon Josefsson [Sun, 24 Mar 2013 09:31:25 +0000 (10:31 +0100)]
Version 3.3.

11 years agoIndent code.
Simon Josefsson [Sun, 24 Mar 2013 09:28:25 +0000 (10:28 +0100)]
Indent code.

11 years agoSilence warnings.
Simon Josefsson [Sun, 24 Mar 2013 09:27:46 +0000 (10:27 +0100)]
Silence warnings.

11 years agoUpdate gnulib files.
Simon Josefsson [Sun, 24 Mar 2013 09:17:07 +0000 (10:17 +0100)]
Update gnulib files.

11 years agoupdated
Nikos Mavrogiannopoulos [Mon, 4 Mar 2013 05:21:51 +0000 (06:21 +0100)]
updated

11 years agoFix check for Android x86
Andoni Morales Alastruey [Tue, 15 Jan 2013 12:00:45 +0000 (13:00 +0100)]
Fix check for Android x86

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
11 years agoFix includes for Bionic X86
Andoni Morales Alastruey [Tue, 15 Jan 2013 11:19:49 +0000 (12:19 +0100)]
Fix includes for Bionic X86

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
11 years agoFix include for Bionic, where SIZE_MAX is in limits.h
Andoni Morales Alastruey [Tue, 15 Jan 2013 11:19:39 +0000 (12:19 +0100)]
Fix include for Bionic, where SIZE_MAX is in limits.h

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
11 years agoMore precise overflow checks using gnulib's intprops module.
Nikos Mavrogiannopoulos [Tue, 1 Jan 2013 11:24:38 +0000 (12:24 +0100)]
More precise overflow checks using gnulib's intprops module.

11 years agoAdded intprops
Nikos Mavrogiannopoulos [Tue, 1 Jan 2013 10:56:27 +0000 (11:56 +0100)]
Added intprops

11 years agoFix GTK-DOC warnings.
Simon Josefsson [Mon, 10 Dec 2012 13:38:25 +0000 (14:38 +0100)]
Fix GTK-DOC warnings.

11 years agoreleased
Nikos Mavrogiannopoulos [Fri, 30 Nov 2012 10:15:15 +0000 (11:15 +0100)]
released

11 years agobumped version
Nikos Mavrogiannopoulos [Thu, 29 Nov 2012 18:00:24 +0000 (19:00 +0100)]
bumped version

11 years agodocumented update
Nikos Mavrogiannopoulos [Sun, 25 Nov 2012 13:22:57 +0000 (14:22 +0100)]
documented update

11 years agocorrected possible buffer overflow in parser errors.
Nikos Mavrogiannopoulos [Sun, 25 Nov 2012 13:16:24 +0000 (14:16 +0100)]
corrected possible buffer overflow in parser errors.

11 years agoupdated
Nikos Mavrogiannopoulos [Sat, 24 Nov 2012 17:40:48 +0000 (18:40 +0100)]
updated

11 years agoreleased 3.1
Nikos Mavrogiannopoulos [Sat, 24 Nov 2012 17:27:34 +0000 (18:27 +0100)]
released 3.1

11 years agorevert to use strlen when writing time values.
Nikos Mavrogiannopoulos [Sat, 24 Nov 2012 17:22:32 +0000 (18:22 +0100)]
revert to use strlen when writing time values.

11 years agoDocumented the new functions
Nikos Mavrogiannopoulos [Sat, 24 Nov 2012 17:13:29 +0000 (18:13 +0100)]
Documented the new functions