krb5_get_in_tkt now only supports old (non-etype-info2) enctypes
authorSam Hartman <hartmans@mit.edu>
Tue, 20 May 2003 22:29:57 +0000 (22:29 +0000)
committerSam Hartman <hartmans@mit.edu>
Tue, 20 May 2003 22:29:57 +0000 (22:29 +0000)
Ticket: 1480
Tags: pullup

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

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/get_in_tkt.c

index a0942a46c263a3446d9afb1fdb3ad2e82fd9d8f1..4cfa1f5f7f806e5a3984afef87aa52ad83dccefe 100644 (file)
@@ -1,5 +1,8 @@
 2003-05-20  Sam Hartman  <hartmans@mit.edu>
 
+       * get_in_tkt.c: get_in_tkt only supports old (non-etype-info2)
+       enctypes. 
+
        * Makefile.in (SRCS): Remove in_ktb.c
 
        * gic_keytab.c (krb5_get_in_tkt_with_keytab): Move from
index 3ccb6066f12bf0b7a5070567784bc5b181a41634..ec6c9bb20ab0d46a1360bceabcfad2e4726bb1d7 100644 (file)
@@ -409,6 +409,15 @@ make_preauth_list(krb5_context     context,
 }
 
 #define MAX_IN_TKT_LOOPS 16
+static krb5_enctype get_in_tkt_enctypes[] = {
+    ENCTYPE_DES3_CBC_SHA1,
+    ENCTYPE_ARCFOUR_HMAC,
+    ENCTYPE_DES_CBC_MD5,
+    ENCTYPE_DES_CBC_MD4,
+    ENCTYPE_DES_CBC_CRC,
+    0
+};
+
 
 krb5_error_code KRB5_CALLCONV
 krb5_get_in_tkt(krb5_context context,
@@ -460,8 +469,13 @@ krb5_get_in_tkt(krb5_context context,
     request.from = creds->times.starttime;
     request.till = creds->times.endtime;
     request.rtime = creds->times.renew_till;
-    if ((retval = krb5_get_default_in_tkt_ktypes(context, &request.ktype)))
+
+    request.ktype = malloc (sizeof(get_in_tkt_enctypes));
+    if (request.ktype == NULL) {
+       retval = ENOMEM;
        goto cleanup;
+    }
+    memcpy(request.ktype, get_in_tkt_enctypes, sizeof(get_in_tkt_enctypes));
     for (request.nktypes = 0;request.ktype[request.nktypes];request.nktypes++);
     if (ktypes) {
        int i, req, next = 0;