From 0ae4a76a7a6b52210e4ee65fad298d9f5c1d484b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 7 Feb 2000 03:54:51 +0000 Subject: [PATCH] added flags field to predicted_sam_response (fcusack) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12008 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 2 +- src/include/k5-int.h | 2 +- src/lib/krb5/asn.1/ChangeLog | 2 +- src/lib/krb5/asn.1/asn1_k_decode.c | 11 ++++++----- src/lib/krb5/asn.1/asn1_k_encode.c | 11 ++++++----- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index bbc0bf9b5..e4e7b32fc 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -2,7 +2,7 @@ Patches from Frank Cusack for hw preauth. * k5-int.h (krb5_predicted_sam_response): Add timestamp, client - principal, and per-mechanism data fields. + principal, flags, and per-mechanism data fields. (krb5_enc_sam_response_enc): Change "passcode" field to "sad". 2000-02-01 Danilo Almeida diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 41a588b32..b573544a8 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -356,11 +356,11 @@ typedef krb5_etype_info_entry ** krb5_etype_info; typedef struct _krb5_predicted_sam_response { krb5_magic magic; krb5_keyblock sam_key; + krb5_flags sam_flags; /* Makes key munging easier */ krb5_timestamp stime; /* time on server, for replay detection */ krb5_int32 susec; krb5_principal client; krb5_data msd; /* mechanism specific data */ - } krb5_predicted_sam_response; typedef struct _krb5_sam_challenge { diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index 68bbdeff3..96f709863 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,7 +1,7 @@ 2000-02-06 Ken Raeburn Patches from Frank Cusack for helping in preauth replay - detection. + detection and spec (passwd-04 draft) compliance. * asn1_k_decode.c (asn1_decode_enc_sam_response_enc): Update for field name change. (asn1_decode_predicted_sam_response): Handle new fields. diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index e98597737..6f72d8e12 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -829,12 +829,13 @@ asn1_error_code asn1_decode_predicted_sam_response(buf, val) setup(); { begin_structure(); get_field(val->sam_key,0,asn1_decode_encryption_key); - get_field(val->stime,1,asn1_decode_kerberos_time); - get_field(val->susec,2,asn1_decode_int32); + get_field(val->sam_flags,1,asn1_decode_sam_flags); + get_field(val->stime,2,asn1_decode_kerberos_time); + get_field(val->susec,3,asn1_decode_int32); alloc_field(val->client,krb5_principal_data); - get_field(val->client,3,asn1_decode_realm); - get_field(val->client,4,asn1_decode_principal_name); - opt_string(val->msd,5,asn1_decode_octectstring); + get_field(val->client,4,asn1_decode_realm); + get_field(val->client,5,asn1_decode_principal_name); + opt_string(val->msd,6,asn1_decode_octetstring); end_structure(); val->magic = KV5M_PREDICTED_SAM_RESPONSE; } diff --git a/src/lib/krb5/asn.1/asn1_k_encode.c b/src/lib/krb5/asn.1/asn1_k_encode.c index 2bc9b132c..20857cd4f 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.c +++ b/src/lib/krb5/asn.1/asn1_k_encode.c @@ -952,11 +952,12 @@ asn1_error_code asn1_encode_predicted_sam_response(buf, val, retlen) { asn1_setup(); - add_optstring(val->msd,5,asn1_encode_octetstring); - asn1_addfield(val->client,4,asn1_encode_principal_name); - asn1_addfield(val->client,3,asn1_encode_realm); - asn1_addfield(val->susec,2,asn1_encode_integer); - asn1_addfield(val->stime,1,asn1_encode_kerberos_time); + add_optstring(val->msd,6,asn1_encode_octetstring); + asn1_addfield(val->client,5,asn1_encode_principal_name); + asn1_addfield(val->client,4,asn1_encode_realm); + asn1_addfield(val->susec,3,asn1_encode_integer); + asn1_addfield(val->stime,2,asn1_encode_kerberos_time); + asn1_addfield(val->sam_flags,1,asn1_encode_sam_flags); asn1_addfield(&(val->sam_key),0,asn1_encode_encryption_key); asn1_makeseq(); -- 2.26.2