svn rev #25634: trunk/src/lib/krb5/asn.1/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Jan 10 02:33:42 EST 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25634
Commit By: ghudson
Log Message:
Simplify asn1_decode_kdc_dh_key_info

Due to some lingering confusion, the last commit changing
asn1_decode_kdc_dh_key_info was correct but overly complicated (and
contained an incorrect comment).  Change it to just use get_lenfield
for subjectPublicKey.


Changed Files:
U   trunk/src/lib/krb5/asn.1/asn1_k_decode.c
Modified: trunk/src/lib/krb5/asn.1/asn1_k_decode.c
===================================================================
--- trunk/src/lib/krb5/asn.1/asn1_k_decode.c	2012-01-10 04:23:56 UTC (rev 25633)
+++ trunk/src/lib/krb5/asn.1/asn1_k_decode.c	2012-01-10 07:33:41 UTC (rev 25634)
@@ -1515,12 +1515,8 @@
     setup();
     val->subjectPublicKey.data = NULL;
     { begin_structure();
-        /* Special handling for [0] IMPLICIT BIT STRING */
-        error_if_bad_tag(0);
-        if (asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)
-            clean_return(ASN1_BAD_ID);
-        get_lenfield_body(val->subjectPublicKey.length,
-                          val->subjectPublicKey.data, asn1_decode_bitstring);
+        get_lenfield(val->subjectPublicKey.length, val->subjectPublicKey.data,
+                     0, asn1_decode_bitstring);
         get_field(val->nonce, 1, asn1_decode_int32);
         opt_field(val->dhKeyExpiration, 2, asn1_decode_kerberos_time, 0);
         end_structure();



More information about the cvs-krb5 mailing list