+Fri Apr 30 00:05:07 1999 Tom Yu <tlyu@mit.edu>
+
+ * kerberos_v4.c (kerberos_v4): Fix bug where krb_create_ticket()
+ was getting called for an APPL_REQUEST even when there was no
+ single-DES key, resulting in random weirdness.
+
Wed Feb 17 17:07:43 1999 Tom Yu <tlyu@mit.edu>
* do_as_req.c (process_as_req): Fix to assign kvno to
des_new_random_key(session_key);
#endif
- krb_create_ticket(tk, k_flags, ad->pname, ad->pinst,
- ad->prealm, client_host.s_addr,
- (char *) session_key, lifetime, kerb_time.tv_sec,
- s_name_data.name, s_name_data.instance,
- key);
+ if (K4KDC_ENCTYPE_OK(k5key.enctype)) {
+ krb_create_ticket(tk, k_flags, ad->pname, ad->pinst,
+ ad->prealm, client_host.s_addr,
+ (char *) session_key, lifetime,
+ kerb_time.tv_sec,
+ s_name_data.name, s_name_data.instance,
+ key);
+ } else {
+ krb_cr_tkt_krb5(tk, k_flags, ad->pname, ad->pinst,
+ ad->prealm, client_host.s_addr,
+ (char *) session_key, lifetime,
+ kerb_time.tv_sec,
+ s_name_data.name, s_name_data.instance,
+ &k5key);
+ }
+ krb5_free_keyblock_contents(kdc_context, &k5key);
memset(key, 0, sizeof(key));
memset(key_s, 0, sizeof(key_s));