summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2009-01-17 00:04:49 +0000
committerKen Raeburn <raeburn@mit.edu>2009-01-17 00:04:49 +0000
commit9b33dd982c6f0ff9085159e8bc708020fc4fb617 (patch)
tree766ad33aa115ffb8ba07b98794935771609213ef /src/lib
parentde53207288a58e1ad80929d52eae5ab406202d0d (diff)
downloadkrb5-9b33dd982c6f0ff9085159e8bc708020fc4fb617.tar.gz
krb5-9b33dd982c6f0ff9085159e8bc708020fc4fb617.tar.xz
krb5-9b33dd982c6f0ff9085159e8bc708020fc4fb617.zip
patch from Luke - fix enctype-nego enctype list setup
ticket: 6336 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21760 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/mk_req_ext.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c
index 4a9d03551f..0d24017ee7 100644
--- a/src/lib/krb5/krb/mk_req_ext.c
+++ b/src/lib/krb5/krb/mk_req_ext.c
@@ -343,23 +343,15 @@ make_etype_list(krb5_context context,
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);