svn rev #21815: trunk/src/kdc/

hartmans@MIT.EDU hartmans at MIT.EDU
Tue Jan 27 20:28:29 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=21815
Commit By: hartmans
Log Message:
ticket: 6352
subject: return correct kvno in TGS case

krb5_c_encrypt sets the kvno of ciphertext to 0.
So fill it in after the call to encrypt_tkt_part.


Changed Files:
U   trunk/src/kdc/do_tgs_req.c
Modified: trunk/src/kdc/do_tgs_req.c
===================================================================
--- trunk/src/kdc/do_tgs_req.c	2009-01-28 00:32:29 UTC (rev 21814)
+++ trunk/src/kdc/do_tgs_req.c	2009-01-28 01:28:25 UTC (rev 21815)
@@ -128,6 +128,7 @@
     const char *emsg = NULL;
     krb5_data *tgs_1 =NULL, *server_1 = NULL;
     krb5_principal krbtgt_princ;
+    krb5_kvno ticket_kvno = 0;
 
     session_key.contents = NULL;
     
@@ -795,11 +796,11 @@
             goto cleanup;
         }
             
-        ticket_reply.enc_part.kvno = 0;
+        ticket_kvno = 0;
         ticket_reply.enc_part.enctype = t2enc->session->enctype;
         st_idx++;
     } else {
-        ticket_reply.enc_part.kvno = server_key->key_data_kvno;
+        ticket_kvno = server_key->key_data_kvno;
     }
 
     errcode = krb5_encrypt_tkt_part(kdc_context, &encrypting_key,
@@ -810,7 +811,7 @@
         status = "TKT_ENCRYPT";
         goto cleanup;
     }
-
+    ticket_reply.enc_part.kvno = ticket_kvno;
     /* Start assembling the response */
     reply.msg_type = KRB5_TGS_REP;
     reply.padata = 0;/* always */




More information about the cvs-krb5 mailing list