diff options
author | Greg Hudson <ghudson@mit.edu> | 2012-03-08 00:37:47 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-03-08 00:37:47 +0000 |
commit | 9220e0c6eaac565f9241e09e0809f206b121eb2c (patch) | |
tree | bcce2be54b2c2088ac63817c54d4cca010944e62 /src/lib/krb5/asn.1 | |
parent | 37bc418a7b3572ad5e31706719949aab6783b936 (diff) | |
download | krb5-9220e0c6eaac565f9241e09e0809f206b121eb2c.tar.gz krb5-9220e0c6eaac565f9241e09e0809f206b121eb2c.tar.xz krb5-9220e0c6eaac565f9241e09e0809f206b121eb2c.zip |
Properly decode etype-info2 with no salt
The data-driven decoder for etype-info2 was neglecting to call
init_no_salt() when no salt is present in the encoding. Add in the
missing call. Also add decode test cases for etype-info2, which would
have caught this if they weren't missing.
ticket: 7100
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25744 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1')
-rw-r--r-- | src/lib/krb5/asn.1/asn1_k_encode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/krb5/asn.1/asn1_k_encode.c b/src/lib/krb5/asn.1/asn1_k_encode.c index 35667ffa55..467e2de6db 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.c +++ b/src/lib/krb5/asn.1/asn1_k_encode.c @@ -602,7 +602,8 @@ DEFSEQTYPE(etype_info_entry, krb5_etype_info_entry, etype_info_entry_fields); /* First field is the same as etype-info. */ DEFCNFIELD(etype_info2_1_def, krb5_etype_info_entry, salt, length, 1, u_generalstring); -DEFOPTIONALTYPE(etype_info2_1, is_salt_present, NULL, etype_info2_1_def); +DEFOPTIONALTYPE(etype_info2_1, is_salt_present, init_no_salt, + etype_info2_1_def); DEFFIELD(etype_info2_2, krb5_etype_info_entry, s2kparams, 2, opt_ostring_data); static const struct atype_info *etype_info2_entry_fields[] = { &k5_atype_etype_info_0, &k5_atype_etype_info2_1, &k5_atype_etype_info2_2 |