Skip to content

Commit

Permalink
Initial revision
Browse files Browse the repository at this point in the history
  • Loading branch information
vlm committed Jun 3, 2004
1 parent 746cb60 commit f15320b
Show file tree
Hide file tree
Showing 277 changed files with 55,557 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Lev Walkin <[email protected]>
31 changes: 31 additions & 0 deletions BUGS
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

0. ASN.1 grammar parser is written mostly with respect to constructing a tree,
so a tree destruction is not fully supported and certain memory leaks are
known. Not a huge problem for run-once programs like a compiler.
NOTE: This statement does not apply to the target code _produced_
by the compiler.

1. REAL type is not supported yet.

2. For purposes of compilation, INTEGER type is modelled using a large
static type (asn_integer_t), but defined as any positive or negative value
by ASN.1. Not a problem as most specifications use very small values anyway.
NOTE: This statement does not apply to the target code _produced_
by the compiler.

3. ASN Macros are prohibited by the current ASN.1 standard,
and are not supported.

4. Multiple tags applied at the same level are not supported:
BadTags ::= [0] EXPLICIT [2] IMPLICIT OtherType
The same thing could be achieved by using the indirection:
GoodTags ::= [0] EXPLICIT OtherTypePtr
OtherTypePtr ::= [2] IMPLICIT OtherType

5. Mixed definite/indefinite length in a _single_ BER tags sequence is not
supported. Should not be a problem in the real world. Please note that it
is still possible, for example, to encode a wrapper structure using definite
length, and encode its substructure member using indefinite length. The BER
decoder is perfectly capable of decoding such sequences.


27 changes: 27 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*-
* Copyright (c) 2003, 2004 Lev Walkin <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
*/
130 changes: 130 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@

0.8.10: 2004-Jun-02

* Added const qualifier where necessary.
* Changed position of outmost_tag fetcher within asn1_TYPE_descriptor_t
structure.

0.8.9: 2004-May-26

* Added *_{get|set}_arcs_*() functions for OBJECT IDENTIFIER
and RELATIVE-OID, together with test cases.

0.8.8: 2004-May-09

* Introduced subtype constraints support (incomplete!).
* Fixed compiler. If the last member of the SEQUENCE is OPTIONAL
and absent in the encoding, and the type is extensible (...) or
EXTENSIBILITY IMPLIED flag is set, then the structure could not
be correctly decoded. (Severity: high, Security impact: low).
* Compiler: fixed recursive ASN.1 types inclusion (Severity: low,
Security impact: none).
* Parser: IMPORTS/FROM fixes, now allowing multiple sections.
* Code compiled and checked on PowerPC (@MacOS X). No major portability
issues experienced.

0.8.7: 2004-Apr-11 T-version-0-8-7

* Fixed SEQUENCE BER decoder: if the last member of the SEQUENCE is
OPTIONAL and absent in the encoding, RC_FAIL was returned instead
of RC_OK (Severity: high, Security impact: low).
* Added test case to check the above problem.
* Added test case to check -fnative-integers mode.

0.8.6: 2004-Apr-03 T-version-0-8-6

* Fixed compiler output for embedded ASN.1 structures.

0.8.5: 2004-Mar-28 T-version-0-8-5

* Fixed ber_tlv_length() computation problem (Severity: blocker,
Security impact: none).
Reported by <[email protected]>

0.8.4: 2004-Mar-22

* Removed RC_ITAG enumeration element from BER decoder.
This return code did not have much practical value.

0.8.3: 2004-Mar-14 T-version-0-8-3

* Fixed SET::BER decoder: restart after reaching a buffer boundary
weas broken (Severity: blocker, Security impact: low).
* Fixed OCTET STRING::BER decoder: restart after reaching a buffer
boundary was broken (Severity: blocker, Security impact: low).
Reported by <[email protected]>
* Added test cases to check decoders restartability.
* Slightly more general INTEGER2long decoder.
* Allowed nested /* C-type */ comments, as per X.680:2002.

0.8.2: 2004-Mar-01 T-version-0-8-2

* Fixed SEQUENCE BER decoder: an OPTIONAL element was required, where
should not have been (Severity: major; Security impact: low).
* Fixed print_struct pointer inheritance.
* Added -fno-c99 and -funnamed-unions

0.8.1: 2004-Feb-22

* -R switch to asn1c: Omit support code, compile only the tables.
* Introduced NativeInteger pseudotype.
* Corrected the informal print_struct()'s output format.

0.8.0: 2004-Feb-03 T-version-0-8-0

* Some documentation is created (a .pdf and a short manual page).
* Last touches to the code.

0.7.9: 2004-Feb-01 T-version-0-7-9

* Human readable printing support.
* Support for implicit (standard) constraints.

0.7.8: 2004-Jan-31

* SET now rejects duplicate fields in the data stream.

0.7.7: 2004-Jan-25

* Added types: GeneralizedTime and UTCTime.

0.7.6: 2004-Jan-24 T-version-0-7-6

* DER encoding of a SET OF now involves dynamic sorting.

0.7.5: 2004-Jan-24 T-version-0-7-5

* DER encoding of a SET with untagged CHOICE
now involves dynamic sorting.

0.7.0: 2004-Jan-19 T-version-0-7-0

* A bunch of DER encoders is implemented.

0.6.6: 2004-Jan-11

* Implemented CHOICE decoder.
* Implemented destructors support.

0.6.5: 2004-Jan-03

* Implemented SET decoder.
* Implemented SET OF and SEQUENCE OF decoders.

0.6.4: 2003-Dec-31

* Implemented BOOLEAN, NULL, ENUMERATED decoders.
* Implemented OCTET STRING decoder.
* Implemented BIT STRING decoder.

0.6: 2003-Dec-30

* First decoding of a BER-encoded structure!

0.5: 2003-Dec-28

* Framework and most of the compiler backbone coding done.

0.1: 2003-Nov-28

* Programming started.
14 changes: 14 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
QUICK START INSTALLATION
========================

./configure # Configure the build infrastructure for your platform
make # Build the libraries and the compiler
make check # Ensure that the code is still behaving well
# after compiling on your platform
make install # Install the compiler into standard location


QUICK USAGE GUIDE
=================

For usage guide and more information please refer to README file.
9 changes: 9 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
libasn1compiler
libasn1parser
libasn1print
libasn1fix
skeletons
examples
tests
asn1c
doc
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

SUBDIRS = \
libasn1parser libasn1print \
libasn1fix libasn1compiler \
skeletons examples tests \
doc asn1c

EXTRA_DIST = BUGS MANIFEST
Loading

0 comments on commit f15320b

Please sign in to comment.