* kdb5_create.c : Remove krb5_enctype references, and replace with
authorChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:19:20 +0000 (03:19 +0000)
committerChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:19:20 +0000 (03:19 +0000)
krb5_keytype where appropriate.

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

src/admin/create/ChangeLog
src/admin/create/kdb5_create.c

index ada0236daeae177c69b00c81f2530f419679103c..fabb42b3eeb0c87cfd97135b35bf7d452cec63c8 100644 (file)
@@ -1,4 +1,9 @@
 
+Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)
+
+       * kdb5_create.c : Remove krb5_enctype references, and replace with 
+               krb5_keytype where appropriate.
+
 Wed Aug 9 18:05:44 EDT 1995    Paul Park       (pjpark@mit.edu)
        * kdb5_create.c - Use default key/salt tuple list or one generated from
                reading KDC profile to determine which key types to make for
index 427e120c74789ec4e23e8445260b9653e516ad55..c99f9d3fc81a6e0554c860db54cee0b0566337da 100644 (file)
@@ -36,7 +36,7 @@ enum ap_op {
     TGT_KEY                            /* special handling for tgt key */
 };
 
-krb5_key_salt_tuple def_kslist = { KEYTYPE_DES, KRB5_KDB_SALTTYPE_NORMAL };
+krb5_key_salt_tuple def_kslist = { KEYTYPE_DES_CBC_CRC, KRB5_KDB_SALTTYPE_NORMAL };
 
 struct realm_info {
     krb5_deltat max_life;
@@ -90,7 +90,7 @@ char *who;
 int status;
 {
     fprintf(stderr, "usage: %s [-d dbpathname] [-r realmname] [-k keytype]\n\
-\t[-e etype] [-M mkeyname]\n",
+\t[-M mkeyname]\n",
            who);
     exit(status);
 }
@@ -140,7 +140,6 @@ char *argv[];
     char *defrealm;
     char *mkey_password = 0;
     int keytypedone = 0;
-    krb5_enctype etype = 0xffff;
     krb5_data scratch, pwd;
     krb5_context context;
     krb5_realm_params *rparams;
@@ -171,11 +170,6 @@ char *argv[];
         case 'P':              /* Only used for testing!!! */
            mkey_password = optarg;
            break;
-       case 'e':
-           if (krb5_string_to_enctype(optarg, &etype))
-               com_err(argv[0], 0, "%s is an invalid encryption type",
-                       optarg);
-           break;
        case '?':
        default:
            usage(argv[0], 1);
@@ -206,10 +200,6 @@ char *argv[];
            keytypedone++;
        }
 
-       /* Get the value for the encryption type */
-       if (rparams->realm_enctype_valid && (etype == 0xffff))
-           etype = rparams->realm_enctype;
-
        /* Get the value for maximum ticket lifetime. */
        if (rparams->realm_max_life_valid)
            rblock.max_life = rparams->realm_max_life;
@@ -253,19 +243,7 @@ char *argv[];
        exit(1);
     }
 
-    if (etype == 0xffff)
-       etype = DEFAULT_KDC_ETYPE;
-
-    if (!valid_etype(etype)) {
-       char tmp[32];
-       if (krb5_enctype_to_string(etype, tmp, sizeof(tmp)))
-           com_err(argv[0], KRB5_PROG_ETYPE_NOSUPP,
-                   "while setting up etype %d", etype);
-       else
-           com_err(argv[0], KRB5_PROG_ETYPE_NOSUPP, tmp);
-       exit(1);
-    }
-    krb5_use_cstype(context, &master_encblock, etype);
+    krb5_use_keytype(context, &master_encblock, master_keyblock.keytype);
 
     retval = krb5_db_set_name(context, dbname);
     if (!retval) retval = EEXIST;