added flags field to predicted_sam_response (fcusack)
authorKen Raeburn <raeburn@mit.edu>
Mon, 7 Feb 2000 03:54:51 +0000 (03:54 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 7 Feb 2000 03:54:51 +0000 (03:54 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12008 dc483132-0cff-0310-8789-dd5450dbe970

src/include/ChangeLog
src/include/k5-int.h
src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/asn1_k_decode.c
src/lib/krb5/asn.1/asn1_k_encode.c

index bbc0bf9b56f88c8b5892040b106ac056f70c8ff2..e4e7b32fce9dcb3b11543dd219cb55a00badeedc 100644 (file)
@@ -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  <dalmeida@mit.edu>
index 41a588b329927370a5ba6fa3551edf40787bb880..b573544a80326f68418c50d6f8c7c1f898955532 100644 (file)
@@ -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 {
index 68bbdeff30eeb73c58238f2f9c9d02acfd1bf99a..96f70986347044f71fd50b652e15f3d34d88ada6 100644 (file)
@@ -1,7 +1,7 @@
 2000-02-06  Ken Raeburn  <raeburn@mit.edu>
 
        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.
index e9859773771d9d60ff7fffd8eea5cc6153b2bf6e..6f72d8e122da55bd8cf7a59ca48a08e2eca4eacc 100644 (file)
@@ -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;
   }
index 2bc9b132c363ed5dd0d1bd29689f3f71c557d836..20857cd4f9299fd95ae0e7c1ca2c8fa1e803ede2 100644 (file)
@@ -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();