svn rev #21760: trunk/src/lib/krb5/krb/

raeburn@MIT.EDU raeburn at MIT.EDU
Fri Jan 16 19:04:51 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=21760
Commit By: raeburn
Log Message:
ticket: 6336

patch from Luke - fix enctype-nego enctype list setup


Changed Files:
U   trunk/src/lib/krb5/krb/mk_req_ext.c
Modified: trunk/src/lib/krb5/krb/mk_req_ext.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_req_ext.c	2009-01-17 00:02:05 UTC (rev 21759)
+++ trunk/src/lib/krb5/krb/mk_req_ext.c	2009-01-17 00:04:49 UTC (rev 21760)
@@ -343,23 +343,15 @@
     for (etypes.length = 0;
 	 etypes.etypes[etypes.length] != ENCTYPE_NULL;
 	 etypes.length++)
-	;
-
-    /*
-     * RFC 4537:
-     *
-     *   If the enctype of the ticket session key is included in the enctype
-     *   list sent by the client, it SHOULD be the last on the list;
-     */
-    for (i = 0; i < etypes.length; i++) {
-	if (etypes.etypes[i] == tkt_enctype) {
-	    krb5_enctype etype;
-
-	    etype = etypes.etypes[etypes.length - 1];
-	    etypes.etypes[etypes.length - 1] = tkt_enctype;
-	    etypes.etypes[i] = etype;
+    {
+	/*
+	 * RFC 4537:
+	 *
+	 *   If the enctype of the ticket session key is included in the enctype
+	 *   list sent by the client, it SHOULD be the last on the list;
+	 */
+	if (etypes.length && etypes.etypes[etypes.length - 1] == tkt_enctype)
 	    break;
-	}
     }
 
     code = encode_krb5_etype_list(&etypes, &enc_etype_list);




More information about the cvs-krb5 mailing list