svn rev #20923: trunk/ src/include/ src/kdc/ src/lib/krb5/asn.1/ src/lib/krb5/krb/ ...
raeburn@MIT.EDU
raeburn at MIT.EDU
Sat Oct 25 03:03:14 EDT 2008
Commit By: raeburn
Log Message:
ticket: new
subject: partial rewrite of the ASN.1 encoders
Instead of a pile of macros generating code, that have to be threaded
together in just the right way to get a valid ASN.1 encoding, we now
have a pile of macros for defining data structures describing the
objects and the ASN.1 types they should be encoded as, which
structures are interpreted by recursive invocations of an encoder
engine; there should be somewhat less rope for accidentally creating
invalid encodings. The new macros are commented in asn1_k_encode.c.
Putting most of the work into the encoder engine also reduces the code
size (in one configuration, including LDAP-KDB and PKINIT encoders,
code size went from 37K to <16K, though 10K of tables were added, and
the PKINIT encoders are still open-coded).
Some encoder interfaces have been revised to be more regular -- all
now take one pointer to const argument (no two-input encoders, no
pointer-to-non-const-pointer-to-const). A few encoders were
eliminated or disabled because they were neither used nor exported
from the library.
The LDAP-KDB encoder has been converted, but the PKINIT encoders have
not as there are no regression tests for them currently.
There is still plenty of room for improvement; some notes on specific
ideas have been added.
String encoding primitives have been combined to reduce code size. A
primitive for encoding bit strings has been added.
Some miscellaneous warnings in the decoders have been cleaned up.
A new dejagnu test case is added that ensures that KRB-SAFE messages
get exercised.
Changed Files:
_U trunk/
U trunk/src/include/k5-int.h
U trunk/src/kdc/kdc_preauth.c
A trunk/src/lib/krb5/asn.1/TODO.asn1
U trunk/src/lib/krb5/asn.1/asn1_encode.c
U trunk/src/lib/krb5/asn.1/asn1_encode.h
U trunk/src/lib/krb5/asn.1/asn1_k_decode.c
U trunk/src/lib/krb5/asn.1/asn1_k_encode.c
U trunk/src/lib/krb5/asn.1/asn1_k_encode.h
U trunk/src/lib/krb5/asn.1/asn1buf.c
U trunk/src/lib/krb5/asn.1/asn1buf.h
U trunk/src/lib/krb5/asn.1/krb5_encode.c
U trunk/src/lib/krb5/asn.1/krbasn1.h
U trunk/src/lib/krb5/asn.1/ldap_key_seq.c
U trunk/src/lib/krb5/krb/chpw.c
U trunk/src/lib/krb5/krb/rd_safe.c
U trunk/src/lib/krb5/krb/send_tgs.c
U trunk/src/tests/asn.1/Makefile.in
U trunk/src/tests/asn.1/krb5_encode_test.c
A trunk/src/tests/dejagnu/krb-standalone/simple.exp
More information about the cvs-krb5
mailing list