salt element is not present, set etype.length to -1.
* asn1_k_encode.c (asn1_encode_etype_info_entry): When encoding
the etype_info_entry structure, use length == -1 to mean
that the optional salt structure should not be sent. (It
used to be if length == -1.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7067
dc483132-0cff-0310-8789-
dd5450dbe970
+Wed Nov 8 20:00:13 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * asn1_k_decode.c (asn1_decode_etype_info_entry): If the optional
+ salt element is not present, set etype.length to -1.
+
+ * asn1_k_encode.c (asn1_encode_etype_info_entry): When encoding
+ the etype_info_entry structure, use length == -1 to mean
+ that the optional salt structure should not be sent. (It
+ used to be if length == -1.)
+
Tue Oct 31 20:06:49 1995 Theodore Y. Ts'o <tytso@dcl>
* krb5_decode.c (decode_krb5_pa_enc_ts, decode_krb5_enc_data):
if (tagnum == 1) {
get_lenfield(val->length,val->salt,1,asn1_decode_octetstring);
} else {
- val->length = 0;
+ val->length = -1;
val->salt = 0;
}
end_structure();
{
asn1_setup();
- if(val == NULL || (val->length != 0 && val->salt == NULL))
+ if(val == NULL || (val->length >= 0 && val->salt == NULL))
return ASN1_MISSING_FIELD;
- if (val->length)
+ if (val->length >= 0)
asn1_addlenfield((int) val->length,val->salt,1,
asn1_encode_octetstring);
asn1_addfield(val->etype,0,asn1_encode_integer);