Patch so that a ticket with no host address generate the correct
authorTheodore Tso <tytso@mit.edu>
Thu, 3 Jun 1993 00:25:41 +0000 (00:25 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 3 Jun 1993 00:25:41 +0000 (00:25 +0000)
ASN.1 code.  (The host address field is optional!!!)

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

src/lib/krb5/asn.1/ketpt2etpt.c

index 876baa4bc208f7435c125b34ba3b65e0c0f4a557..56e40bf574b8841dcd5314717c205d1c529b15cb 100644 (file)
@@ -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);