summaryrefslogtreecommitdiff
path: root/egg/egg-asn1x.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-19asn1: More clear dump display whether something has value/notStef Walter1-1/+7
When dumping parsed DER/ASN.1 tree, print an asterisk if something has a value, and a dot if it was parsed, but no value.
2014-04-19asn1: Add egg_asn1x_get_string_as_usg functionStef Walter1-6/+44
Gets a string as an unsigned integer, removing leading zeros, and combining strings of indefinite length.
2014-03-03Makefile.am: Single Makefile mode and parallel-testsStef Walter1-5/+5
gtk-doc doesn't work as an included Makefile so continue to use SUBDIRS with docs/reference/* Run the tests using TAP. Unfortunately the GTest --tap output mode doesn't behave well in the face of failures, and doesn't output a test plan. Use our own tap-driver and tap-compiler for these reasons. This also fixes several builddir != srcdir issues and testing hacks that were sneaking around in the code base. Move the tests into the same directories as the code that it is testing.
2014-01-31Updated FSF's addressDaniel Mustieles1-2/+1
2013-04-19egg-asn1x: Update for recent changes in libtasn1Stef Walter1-29/+163
2013-02-13Clearer debug message on ASN.1 parse failureStef Walter1-1/+1
2012-11-07egg-asn1x: More complete coverage for ASN.1 testsStef Walter1-77/+62
* Remove or change code that doesn't get executed in normal operation. * Fix a few bugs discovered during the testing.
2012-11-07egg-asn1x: Fix corner case where long DER length overflowsStef Walter1-11/+23
* Better detection of the case where TLV length overflows the size of an int.
2012-11-07egg-asn1x: Bring over changes from gnome-keyringStef Walter1-1/+16
2012-11-07egg-asn1x: Fix crash when parsing invalid DER filesStef Walter1-0/+8
* When parsing invalid DER files and more than one sub-TLV is encountered we would do a NULL dereference. * Catch this condition and test for it.
2012-08-08asn1x: Fix assertion in loading of default integerStef Walter1-2/+4
2012-06-21egg: A few more asn.1 commentsStef Walter1-4/+22
2012-06-21egg: Rework how DER parsing worksStef Walter1-1488/+1596
In particular fix things like * Indefinite parsing * Encoding of defaults * Ability to read values that haven't yet been encoded * Proper handling of ANY tags
2012-06-20Use GBytes instead of our own EggBytesStef Walter1-88/+90
* Bump glib minimum version to 2.32
2011-12-13egg: Check that bytes are valid when they come into ASN.1Stef Walter1-0/+10
2011-11-23gcr: Implement functions for loading and using SubjectPublicKeyInfoStef Walter1-2/+9
* Move key calculation routines into gcr-subject-public-key.c * Move creation of SPK from gcr-fingerprint.c into here * Implement loading of SPK from PKCS#11 certificates, public keys, private keys * Add support for parsing SubjectPublicKeyInfo to parser. Generates attributes for a CKO_PUBLIC_KEY * Fix bugs in DER encoding related to this. * More tweaks on testing infrastructure
2011-11-23egg: Fix regression of DER choice encodingStef Walter1-2/+3
2011-11-23egg: Encode DER tag classes correctlyStef Walter1-11/+27
* Encode DER tag classes correctly for universal, application and private classes
2011-11-23egg: Expose ASN.1 node typesStef Walter1-186/+169
2011-11-23egg: Rename egg_asn1x_xxx_raw_element() to egg_asn1x_xxx_element_raw()Stef Walter1-2/+2
2011-11-21Fix bugs and unused code highlighted by the clang static analyzerStef Walter1-2/+1
2011-11-21egg: Remove usage of libtasn1.hStef Walter1-45/+78
* Copy a few definitions for using the asn1Parser generated definitions files. https://bugzilla.gnome.org/show_bug.cgi?id=664187
2011-11-21Add valgrind memory checking and fix up errorsStef Walter1-2/+23
* This is especially necessary after migrating to EggBytes since it's reference counted and an easy sourc of memory leaks * Remove threading from testing framework, as gcr isn't threadsafe in all parts. * Fix bugs discovered in memory checking. * Fix up some of the testing stuff.
2011-11-16gcr: Use GBytes immutable ref counted byte buffersStef Walter1-206/+389
* Copy from glib patch to EggBytes * This allows us to reliably build up ASN.1 structures from different sources, and is needed for the certificate request work. https://bugzilla.gnome.org/show_bug.cgi?id=663291
2011-10-04egg: Fix parsing of unsigned integers in DERStef Walter1-16/+109
* When the unsigned integer had a high bit set, we would store/parse it incorrectly. We have to force these numbers to be unsigned so we prefix/strip an extra zero byte on the front. * Also make accessing raw and usg numbers in DER not have to copy the value, since these are often sensitive.
2011-09-27gcr: Implement parsing of openpgp packet contents into records.Stef Walter1-30/+1
* Also centralize our timegm() implementation for dumb OS's. * Add tests for openpgp packet parsing * Produces with-colons format in the gnupg style, slight differences but not incompatible.
2011-09-12gcr: Accept slightly invalid PKCS#12 filesStef Walter1-24/+46
* In particular when the order of a SET OF is incorrect as is generated by certain implementations. * Revert cbecc802e8cf5803aac9fbd3c546b539773220b2 since this fix was wrong. * Add egg_asn1x_decode_no_validate() so that callers can validate on their own and specify validation options.
2011-09-12egg: Fix ASN.1 issues validating order of SETOFStef Walter1-3/+3
* Compare just the value, rather than the entire TLV * This fixes some corner cases parsing PKCS#12 files
2011-09-01gcr: Add support for getting friendly name out of a PKCS#12 file.Stef Walter1-0/+19
2011-08-30Fix compile warnings when building with --disable-debugStef Walter1-3/+1
2011-05-13egg: Add support for encoding NULL in ASN.1Stef Walter1-0/+13
2011-05-13Implement calculation of fingerprints for keys.Stef Walter1-2/+2
These are derived from subjectPublicKeyInfo https://bugzilla.gnome.org/show_bug.cgi?id=646905
2011-04-04Release version 3.0.0Stef Walter1-1/+4
2011-01-24Fix undefined type in egg-asn1x.cRyan Stonecipher1-2/+2
Mac OSX doesn't have a ulong type https://bugzilla.gnome.org/show_bug.cgi?id=640362
2010-12-22[egg] Don't try to encode optional sequences if empty.Stef Walter1-0/+2
2010-12-22[egg] Fix uninitialized list pointers.Stef Walter1-0/+2
2010-12-13Merge branch 'master' into trust-storeStef Walter1-11/+14
2010-12-13[egg] Fix memory leaks in ASN.1 code.Stef Walter1-11/+14
2010-11-23[egg] Encode empty SET OF and SEQUENCE OF properly.Stef Walter1-13/+31
Make choices based on whether they contain any other real valid elements inside.
2010-11-23[egg] Must select which choice when building ASN.1.Stef Walter1-56/+95
When building up ASN.1 must select which choice by using the egg_asn1x_set_choice() function.
2010-11-22[egg] Implement egg_asn1x_set_raw_element() for explicitly tagged types.Stef Walter1-32/+66
Also fix encoding of explicitly tagged choice elements.
2010-11-21[egg] Produce proper messages for mismatched tags in DER parsing.Stef Walter1-13/+21
2010-11-19Better ASN.1 test coverage and fixes.Stef Walter1-2/+12
2010-09-20[egg] Add accessor functions for enumerated ASN.1 values.Stef Walter1-8/+91
Add getter and setter for ENUMERATED ASN.1 values, and DER encoder.
2010-09-18[egg] Add egg_asn1x_append() for adding to SEQ OF or SET OFStef Walter1-0/+25
To add a value to a SEQUENCE OF or SET OF, added the function egg_asn1x_append().
2010-07-28[egg] Fix asn.1 parsing into GDate.Stef Walter1-14/+34
* We used g_date_set_time_val which converted using local time. * Changed to set GDate fields independently.
2010-07-26[egg] Fix problems building on 32-bit.Stef Walter1-15/+11
Make encoding of unsigned longs adapt to long size.
2010-07-11Remove run time dependency on libtasn1.Stef Walter1-12/+175
* Required for build when we actually parse ASN.1 files.
2010-07-10Use new DER decoding and encoding routines.Stef Walter1-80/+841
* Benefits are less copies of sensitive data in memory. * More insightful parsing and API.
2010-06-24[egg] Implement some new asn1 tests, and fix problems.Stef Walter1-7/+16