From d32583334d261f4b472a220044d1bb440e256632 Mon Sep 17 00:00:00 2001 From: Richard Basch Date: Tue, 12 Dec 1995 19:45:01 +0000 Subject: [PATCH] * main.c: Changed krb5_db_fetch_mkey() such that it will only try to set the enctype of the keyblock if the keyblock had it set to ENCTYPE_UNKNOWN. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7209 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kdc/main.c b/src/kdc/main.c index 68e6886dc..27c38c66f 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -360,9 +360,8 @@ init_realm(progname, rdp, realm, def_dbname, def_mpname, rdp->realm_mkey.enctype = (krb5_enctype) rparams->realm_enctype; else - /* If not manual, we can lookup the enctype */ - rdp->realm_mkey.enctype = (def_enctype || !manual) - ? def_enctype : ENCTYPE_DES_CBC_CRC; + rdp->realm_mkey.enctype = + manual ? def_enctype : ENCTYPE_UNKNOWN; /* Handle ticket maximum life */ rdp->realm_maxlife = (rparams && rparams->realm_max_life_valid) ? @@ -428,7 +427,8 @@ init_realm(progname, rdp, realm, def_dbname, def_mpname, } /* Select the specified encryption type */ - if (rdp->realm_mkey.enctype) + /* krb5_db_fetch_mkey will setup the encblock for stashed keys */ + if (manual) krb5_use_enctype(rdp->realm_context, &rdp->realm_encblock, rdp->realm_mkey.enctype); -- 2.26.2