From 242e04ecf7978fff145886bf51cb522b69af9d1b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 4 May 1996 00:14:08 +0000 Subject: [PATCH] * krb5_decode.c (decode_krb5_enc_tkt_part): use tagnum correctly to handle 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 | 6 ++++++ src/lib/krb5/asn.1/krb5_decode.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index 34e699dae..5353263dd 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,9 @@ +Thu May 2 21:59:23 1996 Mark Eichin + + * 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 * krb5_decode.c (decode_krb5_sam_challenge, diff --git a/src/lib/krb5/asn.1/krb5_decode.c b/src/lib/krb5/asn.1/krb5_decode.c index 3af86d024..8896bea05 100644 --- a/src/lib/krb5/asn.1/krb5_decode.c +++ b/src/lib/krb5/asn.1/krb5_decode.c @@ -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); -- 2.26.2