From: Theodore Tso Date: Thu, 3 Jun 1993 00:25:41 +0000 (+0000) Subject: Patch so that a ticket with no host address generate the correct X-Git-Tag: krb5-1.0-beta3~270 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=117fd0659c81ad90cec3330e539e2f1c964ff6a5;p=krb5.git Patch so that a ticket with no host address generate the correct ASN.1 code. (The host address field is optional!!!) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2568 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/ketpt2etpt.c b/src/lib/krb5/asn.1/ketpt2etpt.c index 876baa4bc..56e40bf57 100644 --- a/src/lib/krb5/asn.1/ketpt2etpt.c +++ b/src/lib/krb5/asn.1/ketpt2etpt.c @@ -90,16 +90,19 @@ register int *error; if (!retval->endtime) { goto errout; } - if (val->flags & TKT_FLG_RENEWABLE) { + if (val->times.renew_till) { retval->renew__till = unix2gentime(val->times.renew_till, error); if (!retval->renew__till) { goto errout; } } - retval->caddr = krb5_address2KRB5_HostAddresses(val->caddrs, error); - if (!retval->caddr) { - goto errout; - } + if (val->caddrs) { + retval->caddr = krb5_address2KRB5_HostAddresses(val->caddrs, + error); + if (!retval->caddr) { + goto errout; + } + } if (val->authorization_data && *val->authorization_data) { retval->authorization__data = krb5_authdata2KRB5_AuthorizationData(val->authorization_data, error);