* main.c: Changed krb5_db_fetch_mkey() such that it will only try
authorRichard Basch <probe@mit.edu>
Tue, 12 Dec 1995 19:45:01 +0000 (19:45 +0000)
committerRichard Basch <probe@mit.edu>
Tue, 12 Dec 1995 19:45:01 +0000 (19:45 +0000)
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

index 68e6886dc48596c28faf4ff3f4aeb34469fb23f3..27c38c66f596930cfc3ec2f050b1f59bfd94c03c 100644 (file)
@@ -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);