From: Greg Hudson Date: Tue, 10 Jan 2012 07:33:41 +0000 (+0000) Subject: Simplify asn1_decode_kdc_dh_key_info X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f314eacb35216d43620138780534959b67652ab8;p=krb5.git 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25634 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index e0c827c4f..8df166a5a 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -1515,12 +1515,8 @@ asn1_decode_kdc_dh_key_info(asn1buf *buf, krb5_kdc_dh_key_info *val) 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();