as an int32. Handle backwards compatibility if KRB5_GENEROUS_LR_TYPE
is defined.
* krbasn1.h: Define KRB5_GENEROUS_LR_TYPE for compatibility with
one byte negative lr_types which are sent as a positive integer.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12608
dc483132-0cff-0310-8789-
dd5450dbe970
+2000-08-07 Ezra Peisach <epeisach@mit.edu>
+
+ * asn1_k_decode.c (asn1_decode_last_req_entry): Decode the lr_type
+ as an int32. Handle backwards compatibility if KRB5_GENEROUS_LR_TYPE
+ is defined.
+
+ * krbasn1.h: Define KRB5_GENEROUS_LR_TYPE for compatibility with
+ one byte negative lr_types which are sent as a positive integer.
+
2000-06-29 Tom Yu <tlyu@mit.edu>
* asn1buf.h (asn1buf_insert_octet): Define using __inline__ rather
{
setup();
{ begin_structure();
- get_field(val->lr_type,0,asn1_decode_octet);
+ get_field(val->lr_type,0,asn1_decode_int32);
get_field(val->value,1,asn1_decode_kerberos_time);
end_structure();
val->magic = KV5M_LAST_REQ_ENTRY;
+#ifdef KRB5_GENEROUS_LR_TYPE
+ /* If we are only a single byte wide and negative - fill in the
+ other bits */
+ if((val->lr_type & 0xffffff80) == 0x80) val->lr_type |= 0xffffff00;
+#endif
}
cleanup();
}
*/
/* #define KRB5_MSGTYPE_STRICT */
+/*
+ * If KRB5_GENEROUS_LR_TYPE is defined, then we are generous about
+ * accepting a one byte negative lr_type - which is not sign
+ * extended. Prior to July 2000, we were sending a negative lr_type as
+ * a positve single byte value - instead of a signed integer. This
+ * allows us to receive the old value and deal
+ */
+#define KRB5_GENEROUS_LR_TYPE
+
typedef krb5_octet asn1_octet;
typedef krb5_error_code asn1_error_code;