* krb5_decode.c (decode_krb5_enc_tkt_part): use tagnum correctly to handle
authorKen Raeburn <raeburn@mit.edu>
Sat, 4 May 1996 00:14:08 +0000 (00:14 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 4 May 1996 00:14:08 +0000 (00:14 +0000)
optional starttime (previous code *always* replaced starttime with authtime.)

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7889 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/krb5_decode.c

index 34e699dae7bdbbfd4f6e9fc25d10967a29577642..5353263dd54c345fcb463f1771a7b95613dcad89 100644 (file)
@@ -1,3 +1,9 @@
+Thu May  2 21:59:23 1996  Mark Eichin  <eichin@cygnus.com>
+
+       * krb5_decode.c (decode_krb5_enc_tkt_part): use tagnum correctly
+       to handle optional starttime (previous code *always* replaced
+       starttime with authtime.)
+
 Tue Apr  9 22:51:36 1996  Mark Eichin  <eichin@cygnus.com>
 
        * krb5_decode.c (decode_krb5_sam_challenge,
index 3af86d02491e723a42f82333be231768cac97c19..8896bea05d91541f58cbef2281cba8526ac471d8 100644 (file)
@@ -259,9 +259,10 @@ krb5_error_code decode_krb5_enc_tkt_part(code, rep)
     get_field((*rep)->client,3,asn1_decode_principal_name);
     get_field((*rep)->transited,4,asn1_decode_transited_encoding);
     get_field((*rep)->times.authtime,5,asn1_decode_kerberos_time);
-    opt_field((*rep)->times.starttime,6,asn1_decode_kerberos_time);
-    if (tagnum != 6)
-           (*rep)->times.starttime=(*rep)->times.authtime;
+    if (tagnum == 6)
+      { get_field((*rep)->times.starttime,6,asn1_decode_kerberos_time); }
+    else
+      (*rep)->times.starttime=(*rep)->times.authtime;
     get_field((*rep)->times.endtime,7,asn1_decode_kerberos_time);
     opt_field((*rep)->times.renew_till,8,asn1_decode_kerberos_time);
     opt_field((*rep)->caddrs,9,asn1_decode_host_addresses);