Files
heimdal/lib/asn1/ChangeLog
Love Hörnquist Åstrand b838707d0e Commit much improved ASN.1 compiler from joda-choice-branch.
Highlighs for the compiler is support for CHOICE and in general better
support for tags. This compiler support most of what is needed for
PK-INIT, LDAP, X.509, PKCS-12 and many other protocols.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15617 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-12 06:27:42 +00:00

764 lines
20 KiB
Plaintext
Raw Blame History

2005-07-12 Love <lha@kth.se>
* gen_locl.h: rename function filename() to get_filename() to
avoid shadowing
* lex.l: rename function filename() to get_filename() to avoid
shadowing
* gen.c: rename function filename() to get_filename() to avoid
shadowing
* check-der.c: add failure checks for large oid elements
* check-gen.c: add failure checks for tag (and large tags)
* der_get.c: Check for integer overflows in tags and oid elements.
2005-07-10 Assar Westerlund <assar@kth.se>
* gen_decode.c: Fix decoding of choices to select which branch to
try based on the tag and return an error if that branch fails.
* check-gen.c: Fix short choice test cases.
2005-07-09 Assar Westerlund <assar@kth.se>
* symbol.c:
* parse.y:
* main.c:
* lex.l:
* gen_length.c:
* gen_free.c:
* gen_encode.c:
* gen_decode.c:
* gen_copy.c:
* gen.c:
* extra.c:
* check-gen.c:
* check-der.c:
* check-common.c:
* asn1_print.c:
* asn1_gen.c:
Use emalloc, ecalloc, and estrdup.
Check return value from asprintf.
Make sure that malloc(0) returning NULL is not treated as an
error.
2005-07-10 Love <lha@kth.se>
* check-gen.c: test cases for CHOICE, its too liberal right now,
it don't fail hard on failure on after it successfully decoded the
first tag in a choice branch
* asn1_gen.c: calculate the basename for the output file,
pretty-print tag number
* test.gen: sample for asn1_gen
* check-gen.c: check errors in SEQUENCE
* Makefile.am: build asn1_gen, TESTSeq and new, and class/type/tag
string<->num converter.
* test.asn1: TESTSeq, for testing SEQUENCE
* asn1_gen.c: generator for asn1 data
* asn1_print.c: use class/type/tag string<->num converter.
* der.c: Add class/type/tag string<->num converter.
* der.h: Add class/type/tag string<->num converter.
Prototypes/structures for new time bits.
2005-07-09 Love <lha@kth.se>
* der_get.c (der_get_unsigned) check for length overflow
(der_get_integer) ditto
(der_get_general_string) ditto
* der_get.c: check for overruns using SIZE_T_MAX
* check-der.c: check BIT STRING and OBJECT IDENTIFIER error cases
* check-common.c (generic_decode_fail): allocate 4K for the over
sized memory test
* der_get.c (der_get_oid): check for integer overruns and
unterminated oid correctly
* check-common.h (map_alloc, generic_decode_fail): prototypes
* check-common.c (map_alloc): make input buffer const
(generic_decode_fail): verify decoding failures
2005-07-05 Love <lha@kth.se>
* gen_encode.c: split up the printf for SET OF, also use the
generate name for the symbol in the SET OF, if not, the name might
contain non valid variable name characters (like -)
2005-07-04 Love <lha@kth.se>
* Makefile.am: move pkcs12 defines into their own namespace
* pkcs12.asn1: move pkcs12 defines into their own namespace
* pkcs9.asn1: add PKCS9-friendlyName with workaround for SET OF
bug
* heim_asn1.h: reuse heim_octet_string for heim_any types
* main.c: use optidx, handle the case where name is missing and
use base of filename then
* asn1-common.h: include ASN1_MALLOC_ENCODE
* gen_decode.c: use less context so lower indentention level, add
missing {} where needed
2005-07-02 Love <lha@kth.se>
* gen_copy.c: Use a global variable to keep track of if the 'goto
fail' was used, and use that to only generate the label if needed.
* asn1_print.c: do indefinite form loop detection and stop after
10000 recursive indefinite forms, stops crashing due to running
out of stack
* asn1_print.c: catch badly formated indefinite length data
(missing EndOfContent tag) add (negative) indent flag to speed up
testing
2005-07-01 Love <lha@kth.se>
* canthandle.asn1: Can't handle primitives in CHOICE
* gen_decode.c: Check if malloc failes
* gen_copy.c: Make sure to free memory on failure
* gen_decode.c: Check if malloc failes, rename "reallen" to
tagdatalen since that is what it is.
2005-05-29 Love <lha@kth.se>
* prefix Der_class with ASN1_C_ to avoid problems with system
headerfiles that pollute the name space
2005-05-20 Love <lha@kth.se>
* pkcs12.asn1: add PKCS12CertBag
* pkcs9.asn1: add pkcs9 certtype x509 certificate
* Makefile.am: add pkcs12 certbag and pkcs9 certtype x509
certificate
* pkcs12.asn1: split off PKCS12Attributes from SafeBag so it can
be reused
* Makefile.am: add PKCS12Attributes
2005-05-10 Love <lha@kth.se>
* canthandle.asn1: fix tags in example
2005-05-02 Love <lha@kth.se>
* pkinit.asn1: Let the Windows nonce be an int32 (signed), if not
it will fail when using Windows PK-INIT.
2005-05-01 Love <lha@kth.se>
* Makefile.am: add pkcs12-PBEParams
* pkcs12.asn1: add pkcs12-PBEParams
* parse.y: objid_element: exit when the condition fails
2005-04-26 Love <lha@kth.se>
* gen_glue.c: 1.8: switch the units variable to a
function. gcc-4.1 needs the size of the structure if its defined
as extern struct units foo_units[] an we don't want to include
<parse_units.h> in the generate headerfile
2005-03-20 Love <lha@kth.se>
* Makefile.am: add the des-ede3-cbc oid that ansi x9.52 uses
* rfc2459.asn1: add the des-ede3-cbc oid that ansi x9.52 uses
* Makefile.am: add oids for x509
* rfc2459.asn1: add oids now when the compiler can handle them
2005-03-19 Love <lha@kth.se>
* Makefile.am: add pkcs9 files
* pkcs9.asn1: add small number of oids from pkcs9
2005-03-14 Love <lha@kth.se>
* Makefile.am: add a bunch of pkcs1/pkcs2/pkcs3/aes oids
* rfc2459.asn1: add a bunch of pkcs1/pkcs2/pkcs3/aes oids
2005-03-10 Love <lha@kth.se>
* k5.asn1: merge pa-numbers
2005-03-09 Love <lha@kth.se>
* Makefile.am: add oid's
* rfc2459.asn1: add encryption oids
* CMS.asn1: add signedAndEnvelopedData oid
* pkcs12.asn1: add pkcs12 oids
* CMS.asn1: add pkcs7 oids
2005-03-08 Love <lha@kth.se>
* gen.c (generate_header_of_codefile): break out the header
section generation
(generate_constant): generate a function that return the oid
inside a heim_oid
* parse.y: fix the ordering of the oid's
* parse.y: handle OBJECT IDENTIFIER as value construct
2005-02-24 Love <lha@stacken.kth.se>
* Preserve content of CHOICE element that is unknown if ellipsis
was used when defining the structure
2005-02-13 Love <lha@stacken.kth.se>
* parse.y: use ANS1_TAILQ macros
* *.[ch]: use ASN1_TAILQ macros
* asn1_queue.h: inline bsd sys/queue.h and rename TAILQ to
ASN1_TAILQ to avoid problems with name polluting headerfiles
2005-01-19 Love <lha@stacken.kth.se>
* gen.c: pull in <krb5-types.h>
2005-01-10 Love <lha@stacken.kth.se>
* Add BMPString and UniversalString
* k5.asn1 (EtypeList): make INTEGER constrained (use krb5int32)
2005-01-07 Love <lha@stacken.kth.se>
* rfc2459.asn1: add GeneralNames
2004-11-21 Love <lha@stacken.kth.se>
* gen.c: use unsigned integer for len of SequenceOf/SetOf and
bitstring names
2004-11-10 Love <lha@stacken.kth.se>
* Makefile.am: switch to krb5int32 and krb5uint32
* Unify that three integer types TInteger TUInteger and TBigInteger.
Start to use constrained integers where appropriate.
2004-10-13 Love <lha@stacken.kth.se>
* CMS.asn1: remove no longer used commented out elements
* gen_glue.c: make units structures const
2004-10-12 Love <lha@stacken.kth.se>
* lex.l: handle hex number with [a-fA-F] in them
2004-10-07 Love <lha@stacken.kth.se>
* gen_free.c: free _save for CHOICE too
* rfc2459.asn1: use Name and not heim_any
* gen_decode.c: if malloc for _save failes, goto fail so we free
the structure
* gen_copy.c: copy _save for CHOICE too
* gen.c: add _save for CHOICE too
* CMS.asn1: RecipientIdentifier and SignerIdentifier is the same
name is CMSIdentifier and add glue for that so we can share code
use Name and not heim_any
2004-10-03 Love <lha@stacken.kth.se>
* Makefile.am: drop AlgorithmIdentifierNonOpt add
{RC2CBC,}CBCParameter here where they belong
* CMS.asn1: add {RC2CBC,}CBCParameter here where they belong
* rfc2459.asn1: drop AlgorithmIdentifierNonOpt
* rfc2459.asn1: stop using AlgorithmIdentifierNonOpt hint that we
really want to use Name and some MS stuff
2004-09-05 Love <lha@stacken.kth.se>
* asn1_print.c: handle end of content, this is part BER support,
however, OCTET STRING need some tweeking too.
* der.h: add UT_EndOfContent
* test.asn1: test asn1 spec file
* check-gen.c: check larget tags
* Makefile.am: add test asn1 spec file that we can use for testing
constructs that doesn't exists in already existing spec (like
large tags)
* der_put.c (der_put_tag): make sure there are space for the head
tag when we are dealing with large tags (>30)
* check-gen.c: add test for tag length
* check-common.c: export the map_ functions for OVERRUN/UNDERRUN
detection restore the SIGSEGV handler when test is done
* check-common.h: export the map_ functions for OVERRUN/UNDERRUN
detection
* gen_decode.c: check that the tag-length is not longer the length
use forwstr on some more places
* parse.y: revert part of 1.14.2.21, multiple IMPORT isn't allowed
* pkinit.asn1: correct usage of IMPORT
* CMS.asn1: correct usage of IMPORT
* pkcs8.asn1: pkcs8, encrypting private key
* pkcs12.asn1: pkcs12, key/crl/certificate file transport PDU
* Makefile.am: add pkcs8 and pkcs12
* der_free.c: reset length when freing primitives
* CMS.asn1: add EncryptedData
2004-08-26 Love <lha@stacken.kth.se>
* gen_decode.c (decode_type): if the entry is already optional
when parsing a tag and we allocate the structure, not pass down
optional since that will case the subtype's decode_type also to
allocate an entry. and we'll leak an entry. Bug from Luke Howard
<lukeh@padl.com>. While here, use calloc.
2004-04-29 Love <lha@stacken.kth.se>
* k5.asn1: shift the last added etypes one step so rc2 doesn't
stomp on cram-md5
2004-04-26 Love <lha@stacken.kth.se>
* k5.asn1: add ETYPE_AESNNN_CBC_NONE
* CMS.asn1: add CMS symmetrical parameters moved to k5.asn1
* k5.asn1: add CMS symmetrical parameters here, more nametypes
enctype rc2-cbc
2004-04-25 Love <lha@stacken.kth.se>
* gen_decode.c: free data on decode failure
2004-04-24 Love <lha@stacken.kth.se>
* Makefile.am: add CBCParameter and RC2CBCParameter
* CMS.asn1: add CBCParameter and RC2CBCParameter
2004-04-20 Love <lha@stacken.kth.se>
* check-der.c: add simple test for oid's, used to trigger malloc
bugs in you have picky malloc (like valgrind/purify/third)
* der_get.c (der_get_oid): handle all oid components being smaller
then 127 and allocate one extra element since first byte is split
to to elements.
2004-04-16 Love <lha@stacken.kth.se>
* canthandle.asn1: one thing handled
* gen_decode.c: handle OPTIONAL CONS-tag-less elements
* der_length.c (length_len): since length is no longer the same as
an unsigned, do the length counting here. ("unsigned" is zero
padded when most significate bit is set, length is not)
2004-04-12 Love <lha@stacken.kth.se>
* canthandle.asn1: document by example what the encoder can't
handle right now
* Makefile.am: add more stuff needed whem implementing x509
preserve TBSCertificate
* rfc2459.asn1: add more stuff needed whem implementing x509
* CMS.asn1: move some type to rfc2459.asn1 where they belong (and
import them)
* gen.c: preserve the raw data when asked too
* gen_decode.c: preserve the raw data when asked too
* gen_copy.c: preserve the raw data when asked too
* gen_free.c: preserve the raw data when asked too
* gen_locl.h: add preserve_type
* heim_asn1.h: add heim_any_cmp
* main.c: add flag --preserve-binary=Symbol1,Symbol2,... that make
the compiler generate stubs to save the raw data, its not used
right now when generating the stat
* k5.asn1: Windows uses PADATA 15 for the request too
* extra.c: add heim_any_cmp
* der_put.c: implement UTCtime correctly
* der_locl.h: remove #ifdef HAVE_TIMEGM\ntimegm\n#endif here from
der.h so one day der.h can get installed
* der_length.c: implement UTCtime correctly
* der_get.c: implement UTCtime correctly, prefix dce_fix with
_heim_fix
* der_copy.c: make copy_bit_string work again
* der_cmp.c: add octet_string, integer, bit_string cmp functions
* der.h: hide away more symbols, add more _cmp functions
2004-03-06 Love <lha@stacken.kth.se>
* Makefile.am: add more pkix types make k5 use rfc150 bitstrings,
everything else use der bitstrings
* main.c: as a compile time option, handle no rfc1510 bitstrings
* gen_locl.h: rfc1510 bitstrings flag
* gen_length.c: as a compile time option, handle no rfc1510
bitstrings
* gen_encode.c: as a compile time option, handle no rfc1510
bitstrings
* gen_decode.c: handle no rfc1510 bitstrings
* check-gen.c: test for bitstrings
* rfc2459.asn1: add Certificates and KeyUsage
2004-02-22 Love <lha@stacken.kth.se>
* pkinit.asn1: use Name from PKIX
* rfc2459.asn1: add more silly string types to DirectoryString
* gen_encode.c: add checks for data overflow when encoding
TBitString with members encode SET OF correctly by bytewise
sorting the members
* gen_decode.c: add checks for data overrun when encoding
TBitString with members
* der_put.c: add _heim_der_set_sort
* der_cmp.c: rename oid_cmp to heim_oid_cmp
* der.h: rename oid_cmp to heim_oid_cmp, add _heim_der_set_sort
* check-gen.c: add check for Name and (commented out) heim_integer
* check-der.c: test for "der_length.c: Fix len_unsigned for
certain negative integers, it got the length wrong" , from
Panasas, Inc.
* der_length.c: Fix len_unsigned for certain negative integers, it
got the length wrong, fix from Panasas, Inc.
rename len_int and len_unsigned to _heim_\&
* gen_length.c: 1.14: (length_type): TSequenceOf: add up the size
of all the elements, don't use just the size of the last element.
2004-02-20 Love <lha@stacken.kth.se>
* rfc2459.asn1: include defintion of Name
* pkinit.asn1: no need for ContentType, its cms internal
* CMS.asn1: move ContentInfo to CMS
* pkinit.asn1: update to pk-init-18, move ContentInfo to CMS
* Makefile.am: align with pk-init-18, move contentinfo to cms
2004-02-17 Love <lha@stacken.kth.se>
* der_get.c: rewrite previous commit
* der_get.c (der_get_heim_integer): handle positive integer
starting with 0
* der_length.c (der_put_heim_integer): try handle negative
integers better (?)
* der_put.c (der_put_heim_integer): try handle negative integers
better
* der_get.c (der_get_heim_integer): dont abort on negative integer just
return ASN1_OVERRUN for now
* parse.y: add ia5string, and printablestring
* gen_length.c: add ia5string, and printablestring
* gen_free.c: add ia5string, and printablestring
* gen_decode.c: add ia5string, and printablestring
* gen_copy.c: add ia5string, and printablestring
* gen.c: add ia5string, printablestring, and utf8string change
implemetation of heim_integer and store the data as bigendian byte
array with a external flag for signedness
* der_put.c: add ia5string, printablestring, and utf8string change
implemetation of heim_integer and store the data as bigendian byte
array with a external flag for signedness
* der_length.c: add ia5string, printablestring, and utf8string
change implemetation of heim_integer and store the data as
bigendian byte array with a external flag for signedness
* der_get.c: add ia5string, printablestring, and utf8string change
implemetation of heim_integer and store the data as bigendian byte
array with a external flag for signedness
* der_free.c: add ia5string, printablestring, and utf8string
* der_copy.c: add ia5string, printablestring, and utf8string
* der.h: add ia5string, printablestring, and utf8string
* asn1-common.h: add signedness flag to heim_integer, add
ia5string and printablestring
2004-02-13 Love <lha@stacken.kth.se>
* rfc2459.asn1: use BIGINTEGER where appropriate
* setchgpw2.asn1: spelling and add op-req again
2004-02-12 Love <lha@stacken.kth.se>
* Makefile.am: clean up better
2004-02-11 Love <lha@stacken.kth.se>
* gen_decode.c (decode_type): TTag, don't overshare the reallen
variable
* Makefile.am: adapt to log file name change
* gen.c: genereate log file name based on base name
2003-11-26 Love <lha@stacken.kth.se>
* Makefile.am: += asn1_AlgorithmIdentifierNonOpt.x
* rfc2459.asn1: add AlgorithmIdentifierNonOpt and use it where
it's needed, make DomainParameters.validationParms heim_any as a
hack. Both are workarounds for the problem with heimdal's asn1
compiler have with decoing context tagless OPTIONALs.
* pkinit.asn1: don't import AlgorithmIdentifier
2003-11-25 Love <lha@stacken.kth.se>
* der_put.c (der_put_bit_string): make it work somewhat better
(should really prune off all trailing zeros)
* gen_encode.c (encode_type): bit string is not a constructed type
* der_length.c (length_bit_string): calculate right length for
bitstrings
2003-11-24 Love <lha@stacken.kth.se>
* der_cmp.c (oid_cmp): compare the whole array, not just
length/sizeof(component)
* check-common.c: mmap the scratch areas, mprotect before and
after, align data to the edge of the mprotect()ed area to provoke
bugs
* Makefile.am: add DomainParameters, ValidationParms
* rfc2459.asn1: add DomainParameters, ValidationParms
* check-der.c: add free function
* check-common.h: add free function
* check-common.c: add free function
* check-gen.c: check KRB-ERROR
* asn1_print.c: check end of tag_names loop into APPL class tags
2003-11-23 Love <lha@stacken.kth.se>
* der_put.c (der_put_generalized_time): check size, not *size
2003-11-11 Love <lha@stacken.kth.se>
* gen_decode.c (decode_type/TBitString): skip over
skipped-bits-in-last-octet octet
* gen_glue.c (generate_units): generate units in reverse order to
keep unparse_units happy
2003-11-08 Love <lha@stacken.kth.se>
* Makefile.am: generate all silly pkinit files
* pkinit.asn1: make it work again, add strange ms structures
* k5.asn1: PROV-SRV-LOCATION, PacketCable provisioning server
location, PKT-SP-SEC-I09-030728
* asn1-common.h: add bit string
* der_put.c: add bit string and utctime
* gen.c: add bit string and utctime
* gen_copy.c: add bit string and utctime
* der_copy.c: add bit string
* gen_decode.c: add utctime and bitstring
* gen_encode.c: add utctime and bitstring
* gen_free.c: add utctime and bitstring
* gen_glue.c: don't generate glue for member-less bit strings
* der_cmp.c: compare function for oids
* gen_length.c: add utc time, make bit string work for bits
strings w/o any members
* der_cmp.c: compare function for oids
* der.h: update boolean prototypes add utctime and bit_string
* der_free.c: add free_bit_string
* der_get.c: add bit string and utctime
* der_length.c: add bit string and utctime, fix memory leak in
length_generalized_time
* CMS.asn1: make EncryptedContentInfo.encryptedContent a OCTET
STRING to make the generator do the right thing with IMPLICIT
mumble OPTIONAL, make CertificateSet a heim_any_set
* extra.c, heim_asn1.h: add any_set, instead of just consuming one
der object, its consumes the rest of the data avaible
* extra.c, heim_asn1.h: extern implementation of ANY, decoder
needs to have hack removed when generator handles tagless optional
data
* pkinit.asn1: add KdcDHKeyInfo-Win2k
2003-11-07 Love H<>rnquist <20>strand <lha@it.su.se>
* der_copy.c (copy_oid): copy all components
* parse.y: parse UTCTime, allow multiple IMPORT
* symbol.h: add TUTCTime
* rfc2459.asn1: update
* x509.asn1: update
* pkinit.asn1: update
* CMS.asn1: new file
* asn1_print.c: print some more lengths, check length before
steping out in the void, parse SET, only go down CONTEXT of type
CONS (not PRIM)
2003-09-17 Love H<>rnquist <20>strand <lha@it.su.se>
* gen_encode.c (TChoice, TSequence): code element in reverse
order...
2003-09-16 Love H<>rnquist <20>strand <lha@it.su.se>
* gen.c: store NULL's as int's for now
* parse.y: remove dup of type def of UsefulType
2003-09-11 Love H<>rnquist <20>strand <lha@it.su.se>
* gen_decode.c (decode_type): if malloc failes, return ENOMEM
2003-09-10 Love H<>rnquist <20>strand <lha@it.su.se>
* parse.y: kw_UTF8String is a token put tag around the OID
* asn1_print.c (UT_Integer): when the integer is larger then int
can handle, just print BIG INT and its size
2003-09-10 Love H<>rnquist <20>strand <lha@it.su.se>
* gen_decode.c (decode_type): TTag, try to generate prettier code
in the non optional case, also remember to update length
2003-01-22 Johan Danielsson <joda@pdc.kth.se>
* gen_decode.c: add flag to decode broken DCE BER encoding
* gen_locl.h: add flag to decode broken DCE BER encoding
* main.c: add flag to decode broken DCE BER encoding