Use content-only ASN.1 primitives
authorGreg Hudson <ghudson@mit.edu>
Fri, 6 Jan 2012 20:52:12 +0000 (20:52 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 6 Jan 2012 20:52:12 +0000 (20:52 +0000)
commit3688edd67398b6d8f6a80c400889c1a361dffcda
tree9549dce0e17341fb72790b87f1f5a97ea96c6b7b
parentb395cc1a0ebb434a257460a7d42f248177882173
Use content-only ASN.1 primitives

As part of implicit tag support, rework ASN.1 encoding primitives so
that they encode only content, not tags.  Combine primitives which
become identical with this change.  The new atype_primitive type
invokes a primitive encoder and adds a tag.  atype_fn_len is split
into atype_string and atype_opaque, both of which are hardcoded to
use asn1_encode_bytestring.

For the encoders still using macros, create asn1_addprimitive,
asn1_addinteger, and asn1_addstring macros which call the primitive
encoder function and add a tag.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25612 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/asn.1/asn1_encode.c
src/lib/krb5/asn.1/asn1_encode.h
src/lib/krb5/asn.1/asn1_k_encode.c