Permalink
Browse files

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
  • Loading branch information...
1 parent 0531fdf commit 806b6b51263b5d64d94d24563ef8677e8ee0b2d2 ghudson committed Jan 10, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 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();

0 comments on commit 806b6b5

Please sign in to comment.