Permalink
Browse files

Bug 13996 - krb5_copy_context() is causing crash Initialize etype/kty…

…pe arrays in krb5_context with same defaults found in krb5.conf.

(krb5: r64203)
  • Loading branch information...
1 parent 9bf079a commit 05117a75b700552ded8c10962eb477dbe80bd6b7 Unknown committed with gitsync Apr 13, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 krb5/src/lib/krb5/krb/init_ctx.c
@@ -67,10 +67,9 @@
them. This'll be fixed, but for better compatibility, let's prefer
des-crc for now. */
static krb5_enctype default_enctype_list[] = {
- ENCTYPE_AES256_CTS_HMAC_SHA1_96, ENCTYPE_AES128_CTS_HMAC_SHA1_96,
- ENCTYPE_DES3_CBC_SHA1,
ENCTYPE_ARCFOUR_HMAC,
- ENCTYPE_DES_CBC_CRC, ENCTYPE_DES_CBC_MD5, ENCTYPE_DES_CBC_MD4,
+ ENCTYPE_DES_CBC_MD5,
+ ENCTYPE_DES_CBC_CRC,
0
};
@@ -161,6 +160,13 @@ init_common (krb5_context *context, krb5_boolean secure, krb5_boolean kdc)
ctx->profile_secure = secure;
+ /* Set the default encryption types, possible defined in krb5/conf */
+ if ((retval = krb5_set_default_in_tkt_ktypes(ctx, default_enctype_list)))
+ goto cleanup;
+
+ if ((retval = krb5_set_default_tgs_enctypes(ctx, default_enctype_list)))
+ goto cleanup;
+
if ((retval = krb5_os_init_context(ctx, kdc)))
goto cleanup;

0 comments on commit 05117a7

Please sign in to comment.