Make dh_key_info encoder and decoder symmetric
authorGreg Hudson <ghudson@mit.edu>
Mon, 9 Jan 2012 21:03:58 +0000 (21:03 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 9 Jan 2012 21:03:58 +0000 (21:03 +0000)
commit2be4076efedd845c04db91d7cbbf57cd86353465
treee6c2eb2287b6f7ad48aeae7821890084c4a13393
parentbde5e9efadbdf0fb0b2d1dd16efcb83e82e433e4
Make dh_key_info encoder and decoder symmetric

The dh_key_info encoder expects subjectPublicKey to contain the
contents of a bit string, but the decoder outputs the DER encoding of
the bit string including tag.  The PKINIT client code expects this, so
everything works, but the encoder and decoder should be symmetric.
Change the decoder to process the bit string (adding a bit string
decoding primitive) and modify the PKINIT client code to expect only
the bit string contents.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25626 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/asn.1/asn1_decode.c
src/lib/krb5/asn.1/asn1_decode.h
src/lib/krb5/asn.1/asn1_k_decode.c
src/plugins/preauth/pkinit/pkinit_crypto_nss.c
src/plugins/preauth/pkinit/pkinit_crypto_openssl.c