* adm_adm_func.c, adm_fmt_inq.c, adm_funcs.c, adm_process.c,
authorChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:25:49 +0000 (03:25 +0000)
committerChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:25:49 +0000 (03:25 +0000)
* adm_server.c, adm_v4_pwd.c adm_v4_pwd.c: Remove krb5_enctype
references, and replace with krb5_keytype where appropriate.

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

src/kadmin.old/server/ChangeLog
src/kadmin.old/server/adm_adm_func.c
src/kadmin.old/server/adm_fmt_inq.c
src/kadmin.old/server/adm_funcs.c
src/kadmin.old/server/adm_process.c
src/kadmin.old/server/adm_server.c
src/kadmin.old/server/adm_v4_pwd.c

index 5db374d9ca613d4ff98a4c4eb7c6fa3663e2c20d..819293bd9397a2a50879d8ce8437ffec2c4d712f 100644 (file)
@@ -1,4 +1,10 @@
 
+Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)
+
+        * adm_adm_func.c, adm_fmt_inq.c, adm_funcs.c, adm_process.c,
+       * adm_server.c, adm_v4_pwd.c adm_v4_pwd.c: Remove krb5_enctype 
+               references, and replace with krb5_keytype where appropriate.
+
 Mon Aug 21 17:05:18 EDT 1995   Paul Park       (pjpark@mit.edu)
        * adm_server.c - Change dbm_db_set_name to db_set_name.  Interpret -k
                and -e arguments as strings instead of string representations
index 2f09cde7a31524d87aad69f741aac53a38c55827..58eff881c54c17b741594d00e427d91156dfbaf7 100644 (file)
@@ -111,7 +111,7 @@ adm_build_key (context, auth_context, new_passwd, oper_type, entry)
        key_data = (krb5_key_data *) NULL;
        if (krb5_dbe_find_keytype(context,
                                  &entry,
-                                 KEYTYPE_DES,
+                                 KEYTYPE_DES_CBC_MD5,
                                  ((oper_type == CHGOPER) ? 
                                   KRB5_KDB_SALTTYPE_NORMAL : 
                                   KRB5_KDB_SALTTYPE_V4),
@@ -603,28 +603,28 @@ adm_mod_old_key(context, auth_context, cmdname, customer_name)
             */
            if (!krb5_dbe_find_keytype(context,
                                       &entry,
-                                      KEYTYPE_DES,
+                                      KEYTYPE_DES_CBC_MD5,
                                       KRB5_KDB_SALTTYPE_NORMAL,
                                       -1,
                                       &kdata))
                kdata->key_data_kvno = atoi(tempstr);
            if (!krb5_dbe_find_keytype(context,
                                       &entry,
-                                      KEYTYPE_DES,
+                                      KEYTYPE_DES_CBC_CRC,
                                       KRB5_KDB_SALTTYPE_V4,
                                       -1,
                                       &kdata))
                kdata->key_data_kvno = atoi(tempstr);
            if (!krb5_dbe_find_keytype(context,
                                       &entry,
-                                      KEYTYPE_DES,
+                                      KEYTYPE_DES_CBC_MD5,
                                       KRB5_KDB_SALTTYPE_NOREALM,
                                       -1,
                                       &kdata))
                kdata->key_data_kvno = atoi(tempstr);
            if (!krb5_dbe_find_keytype(context,
                                       &entry,
-                                      KEYTYPE_DES,
+                                      KEYTYPE_DES_CBC_MD5,
                                       KRB5_KDB_SALTTYPE_ONLYREALM,
                                       -1,
                                       &kdata))
index 94a1fc52a4e566f3524465a31b3ce6b7d6ec55a0..3ff13a9c3bb01a797dc7ccf899fd9f01a627728d 100644 (file)
@@ -171,7 +171,7 @@ adm_fmt_prt(context, entry, Principal_name, ret_data)
     pkey = (krb5_key_data *) NULL;
     if (retval = krb5_dbe_find_keytype(context,
                                       entry,
-                                      KEYTYPE_DES,
+                                      KEYTYPE_DES_CBC_MD5,
                                       KRB5_KDB_SALTTYPE_NORMAL,
                                       -1,
                                       &pkey)) {
index 2e612c9063f933e4d92c7d67e290a6a4215d5103..1bf841c9e7a6a22ec2e4cdfe79c1f0e5e7b57242 100644 (file)
@@ -47,8 +47,8 @@ struct saltblock {
 };
 
 static const krb5_key_salt_tuple       keysalts[] = {
-{ KEYTYPE_DES, KRB5_KDB_SALTTYPE_NORMAL },
-{ KEYTYPE_DES, KRB5_KDB_SALTTYPE_V4 }
+{ KEYTYPE_DES_CBC_MD5, KRB5_KDB_SALTTYPE_NORMAL },
+{ KEYTYPE_DES_CBC_CRC, KRB5_KDB_SALTTYPE_V4 }
 };
 static const krb5_int32                        n_keysalts =
        sizeof(keysalts) / sizeof(keysalts[0]);
index 98ab5ac1ffc84f135e30b4d00a98846143b36d5a..abab60abab7436fba4d337b8a1eb96bc53548ab7 100644 (file)
@@ -82,7 +82,7 @@ cpw_keyproc(context, keyblock)
        /* Find our key */
        if (retval = krb5_dbe_find_keytype(context,
                                           &cpw_entry,
-                                          KEYTYPE_DES,
+                                          KEYTYPE_DES_CBC_MD5,
                                           -1,
                                           -1,
                                           &kdatap)) {
@@ -210,7 +210,7 @@ process_client(context, prog)
     /* Find our key */
     if (retval = krb5_dbe_find_keytype(context,
                                       &server_entry,
-                                      KEYTYPE_DES,
+                                      KEYTYPE_DES_CBC_MD5,
                                       -1,
                                       -1,
                                       &kdatap)) {
index ae67a8ee1108bb4e23b8ccca808228173f725750..547c40693dba43e54a60d3b62d90bf45540173a5 100644 (file)
@@ -121,8 +121,7 @@ process_args(context, argc, argv)
     int keytypedone = 0;
     char *mkey_name = 0;
     char *local_realm;
-    krb5_enctype etype;
-    krb5_enctype kdc_etype = DEFAULT_KDC_ETYPE;
+    krb5_keytype ktype;
 
 #ifdef SANDIA
     char input_string[80];
@@ -165,12 +164,6 @@ process_args(context, argc, argv)
                }
                break;
 
-           case 'e':
-               if (krb5_string_to_enctype(optarg, &kdc_etype))
-                   fprintf(stderr, "%s: %s is an invalid encryption type\n",
-                           argv[0], optarg);
-               break;
-               
            case 'k':                   /* keytype for master key */
                if (!krb5_string_to_keytype(optarg, &master_keyblock.keytype))
                    keytypedone++;
@@ -222,7 +215,7 @@ process_args(context, argc, argv)
     }
  
     if (!keytypedone) {
-       master_keyblock.keytype = KEYTYPE_DES;
+       master_keyblock.keytype = KEYTYPE_DES_CBC_MD5;
     }
  
     /* assemble & parse the master key name */
@@ -234,12 +227,7 @@ process_args(context, argc, argv)
        exit(1);
     }
 
-    if (!valid_etype(kdc_etype)) {
-       com_err(argv[0], KRB5_PROG_ETYPE_NOSUPP,
-               "while setting up etype %d", kdc_etype);
-       exit(1);
-    }
-    krb5_use_cstype(context, &master_encblock, kdc_etype);
+    krb5_use_keytype(context, &master_encblock, master_keyblock.keytype);
  
     if ((retval = krb5_db_fetch_mkey(context, 
                master_princ, 
@@ -254,15 +242,15 @@ process_args(context, argc, argv)
     }
 
     /* initialize random key generators */
-    for (etype = 0; etype <= krb5_max_cryptosystem; etype++) {
-       if (krb5_csarray[etype]) {
-               if ((retval = (*krb5_csarray[etype]->system->
+    for (ktype = 0; ktype <= krb5_max_keytype; ktype++) {
+       if (krb5_keytype_array[ktype]) {
+               if (retval = (*krb5_keytype_array[ktype]->system->
                                init_random_key)(&master_keyblock,
-                               &krb5_csarray[etype]->random_sequence))) {
+                               &krb5_keytype_array[ktype]->random_sequence)) {
                        com_err(argv[0], retval, 
-       "while setting up random key generator for etype %d--etype disabled", 
-                               etype);
-                       krb5_csarray[etype] = 0;
+       "while setting up random key generator for ktype %d--ktype disabled", 
+                               ktype);
+                       krb5_keytype_array[ktype] = 0;
                }
        }
     }
@@ -366,12 +354,12 @@ init_db(context, dbname, masterkeyname, masterkeyblock)
        convert server.key into a real key 
        (it may be encrypted in the database) 
  */
-    if ((retval = krb5_dbe_find_keytype(context,
-                                       &server_entry,
-                                       KEYTYPE_DES,
-                                       -1,
-                                       -1,
-                                       &kdatap))) {
+    if (retval = krb5_dbe_find_keytype(context,
+                                      &server_entry,
+                                      KEYTYPE_DES_CBC_MD5,
+                                      -1,
+                                      -1,
+                                      &kdatap)) {
        krb5_db_free_principal(context, &server_entry, number_of_entries);
        (void) krb5_finish_key(context, &master_encblock);
        memset((char *)&master_encblock, 0, sizeof(master_encblock));
index b74d923726ef48111a9cb92f0147f77cee516f57..8728092cc390ab48623b319dbb323995e9ec6a8c 100644 (file)
@@ -357,7 +357,7 @@ int *outlen;
         return(1);
     }  
  
-    v5_keyblock->keytype = KEYTYPE_DES;
+    v5_keyblock->keytype = KEYTYPE_DES_CBC_MD5;
     v5_keyblock->length = 8;
     if (!(v5_keyblock->contents = (krb5_octet *) calloc (1,
                 8))) {