* admin.c, passwd.c, srv_key.c, srv_main.c :
authorChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 19:03:08 +0000 (19:03 +0000)
committerChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 19:03:08 +0000 (19:03 +0000)
s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g

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

src/kadmin/v5server/ChangeLog
src/kadmin/v5server/admin.c
src/kadmin/v5server/passwd.c
src/kadmin/v5server/srv_key.c
src/kadmin/v5server/srv_main.c

index 509706ba5a192c614bb6ae09f3c42bfd1d298d86..59bcdb79eabbe509a3f31cf3c006ee58eddb8065 100644 (file)
@@ -1,3 +1,7 @@
+Wed Sep 06 14:20:57 1995   Chris Provenzano (proven@mit.edu)
+
+        * admin.c, passwd.c, srv_key.c, srv_main.c : 
+               s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g
 
 Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)
 
index f0d228e19f71baab5fb9e382b62caff0d4db45a0..76304f8f072669419dc2148d2dace43fc8b49fbd 100644 (file)
@@ -230,15 +230,15 @@ admin_merge_keys(kcontext, dbentp, unique,
                xxx2.n_key_data = nkeys2;
                xxx2.key_data = in2;
                for (i=0; i<nksents; i++) {
-                   (void) krb5_dbe_find_keytype(kcontext,
+                   (void) krb5_dbe_find_enctype(kcontext,
                                                 &xxx1,
-                                                kslist[i].ks_keytype,
+                                                kslist[i].ks_enctype,
                                                 kslist[i].ks_salttype,
                                                 -1,
                                                 &kp1);
-                   (void) krb5_dbe_find_keytype(kcontext,
+                   (void) krb5_dbe_find_enctype(kcontext,
                                                 &xxx2,
-                                                kslist[i].ks_keytype,
+                                                kslist[i].ks_enctype,
                                                 kslist[i].ks_salttype,
                                                 -1,
                                                 &kp2);
@@ -1199,9 +1199,9 @@ admin_keysalt_verify(kcontext, debug_level, dbentp, should_be_there,
     DPRINT(DEBUG_CALLS, debug_level, ("* admin_keysalt_verify()\n"));
     for (i=0; i<nksents; i++) {
        kdata = (krb5_key_data *) NULL;
-       (void) krb5_dbe_find_keytype(kcontext,
+       (void) krb5_dbe_find_enctype(kcontext,
                                     dbentp,
-                                    kslist[i].ks_keytype,
+                                    kslist[i].ks_enctype,
                                     kslist[i].ks_salttype,
                                     kvnolist[i],
                                     &kdata);
@@ -1247,9 +1247,9 @@ admin_keysalt_operate(kcontext, debug_level, dbentp, password, keyectomy,
     if (keyectomy) {
        count = dbentp->n_key_data;
        for (i=0; i<nksents; i++) {
-           if (!krb5_dbe_find_keytype(kcontext,
+           if (!krb5_dbe_find_enctype(kcontext,
                                       dbentp,
-                                      kslist[i].ks_keytype,
+                                      kslist[i].ks_enctype,
                                       kslist[i].ks_salttype,
                                       kvnolist[i],
                                       &kdata)) {
@@ -1970,7 +1970,7 @@ admin_extract_key(kcontext, debug_level, ticket,
                                                      &dkey_list))) {
                            ktabentry.principal = principal;
                            ktabentry.vno = dkey_list[0].key_data_kvno;
-                           ktabentry.key.keytype =
+                           ktabentry.key.enctype =
                                dkey_list[0].key_data_type[0];
                            ktabentry.key.length = 
                                dkey_list[0].key_data_length[0];
@@ -2071,7 +2071,7 @@ admin_extract_key(kcontext, debug_level, ticket,
 }
 \f
 /*
- * admin_add_key()     - Add new keytypes for the given principal.
+ * admin_add_key()     - Add new enctypes for the given principal.
  */
 krb5_int32
 admin_add_key(kcontext, debug_level, ticket, nargs, arglist)
@@ -2096,7 +2096,7 @@ admin_add_key(kcontext, debug_level, ticket, nargs, arglist)
 }
 \f
 /*
- * admin_delete_key()  - Delete keytypes for the given principal.
+ * admin_delete_key()  - Delete enctypes for the given principal.
  */
 krb5_int32
 admin_delete_key(kcontext, debug_level, ticket, nargs, arglist)
index c239442e4251bab4a6a3ccb72fe68133af547e3a..dd895af5b632df4e83118bd8ccf62a664604d6be 100644 (file)
@@ -160,9 +160,9 @@ passwd_check_opass_ok(kcontext, debug_level, princ, dbentp, pwdata)
     dbentp->key_data = dkey_list;
     dbentp->n_key_data = num_dkeys;
     for (i=0; i<num_keys; i++) {
-       if (!krb5_dbe_find_keytype(kcontext,
+       if (!krb5_dbe_find_enctype(kcontext,
                                   dbentp,
-                                  (krb5_keytype) key_list[i].key_data_type[0],
+                                  (krb5_enctype) key_list[i].key_data_type[0],
                                   (krb5_int32) key_list[i].key_data_type[1],
                                   -1,
                                   &kent)) {
index 60e68f2b1d9165d01828941df4bcd1a5aedca081..e5faa2ded3011f71561ed9a66a436c5dc21f8d43 100644 (file)
@@ -98,7 +98,7 @@ static int            key_num_ktents = 0;
 static krb5_key_salt_tuple *key_ktents = (krb5_key_salt_tuple *) NULL;
 static int             key_ktents_inited = 0;
 static krb5_key_salt_tuple default_ktent = {
-    KEYTYPE_DES_CBC_MD5, KRB5_KDB_SALTTYPE_NORMAL
+    ENCTYPE_DES_CBC_MD5, KRB5_KDB_SALTTYPE_NORMAL
 };
 
 static char            *key_db_name = (char *) NULL;
@@ -316,16 +316,16 @@ key_get_admin_entry(kcontext)
         */
        xxx.n_key_data = (krb5_int16) madmin_num_keys;
        xxx.key_data = madmin_keys;
-       if (krb5_dbe_find_keytype(kcontext,
+       if (krb5_dbe_find_enctype(kcontext,
                                  &xxx,
-                                 KEYTYPE_DES_CBC_MD5,
+                                 ENCTYPE_DES_CBC_MD5,
                                  -1,
                                  -1,
                                  &kdata))
            kdata = &madmin_keys[0];
 
        memset(&madmin_key, 0, sizeof(krb5_keyblock));
-       madmin_key.keytype = KEYTYPE_DES_CBC_MD5;
+       madmin_key.enctype = ENCTYPE_DES_CBC_MD5;
        madmin_key.length = kdata->key_data_length[0];
        madmin_key.contents = kdata->key_data_contents[0];
     }
@@ -372,7 +372,7 @@ key_init(kcontext, debug_level, key_type, master_key_name, manual,
     /*
      * Figure out arguments.
      */
-    master_keyblock.keytype=((key_type == -1) ? KEYTYPE_DES_CBC_MD5 : key_type);
+    master_keyblock.enctype=((key_type == -1) ? ENCTYPE_DES_CBC_MD5 : key_type);
     mkey_name = ((!master_key_name) ? KRB5_KDB_M_NAME : master_key_name);
 
     /*
@@ -471,7 +471,7 @@ key_init(kcontext, debug_level, key_type, master_key_name, manual,
     }
     ment_init = 1;
 
-    krb5_use_keytype(kcontext, &master_encblock, master_keyblock.keytype);
+    krb5_use_enctype(kcontext, &master_encblock, master_keyblock.enctype);
 
     /* Go get the master key */
     kret = krb5_db_fetch_mkey(kcontext,
@@ -653,10 +653,10 @@ key_string2key_keysalt(ksent, ptr)
      * Determine if this key/salt pair is salted.
      */
     salted = 0;
-    krb5_use_keytype(argp->context, &master_encblock, ksent->ks_keytype);
-    if (!krb5_dbe_find_keytype(argp->context,
+    krb5_use_enctype(argp->context, &master_encblock, ksent->ks_enctype);
+    if (!krb5_dbe_find_enctype(argp->context,
                               argp->dbentry,
-                              ksent->ks_keytype,
+                              ksent->ks_enctype,
                               ksent->ks_salttype,
                               -1,
                               &kdata)) {
@@ -670,7 +670,7 @@ key_string2key_keysalt(ksent, ptr)
         */
        if (!(kret = krb5_dbe_create_key_data(argp->context, argp->dbentry))) {
            kdata = &argp->dbentry->key_data[argp->dbentry->n_key_data-1];
-           kdata->key_data_type[0] = (krb5_int16) ksent->ks_keytype;
+           kdata->key_data_type[0] = (krb5_int16) ksent->ks_enctype;
            kdata->key_data_type[1] = (krb5_int16) ksent->ks_salttype;
        }
     }
@@ -843,10 +843,10 @@ key_randomkey_keysalt(ksent, ptr)
     argp = (struct keysalt_iterate_args *) ptr;
     kret = 0;
 
-    krb5_use_keytype(argp->context, &master_encblock, ksent->ks_keytype);
-    if (krb5_dbe_find_keytype(argp->context,
+    krb5_use_enctype(argp->context, &master_encblock, ksent->ks_enctype);
+    if (krb5_dbe_find_enctype(argp->context,
                              argp->dbentry,
-                             ksent->ks_keytype,
+                             ksent->ks_enctype,
                              ksent->ks_salttype,
                              -1,
                              &kdata)) {
@@ -856,7 +856,7 @@ key_randomkey_keysalt(ksent, ptr)
         */
        if (!(kret = krb5_dbe_create_key_data(argp->context, argp->dbentry))) {
            kdata = &argp->dbentry->key_data[argp->dbentry->n_key_data-1];
-           kdata->key_data_type[0] = (krb5_int16) ksent->ks_keytype;
+           kdata->key_data_type[0] = (krb5_int16) ksent->ks_enctype;
            kdata->key_data_type[1] = (krb5_int16) 0;
        }
     }
@@ -969,11 +969,11 @@ key_encrypt_keys(kcontext, dbentp, nkeysp, inkeys, outkeysp)
     ndone = 0;
     nkeys = *nkeysp;
     for (i=0; i<nkeys; i++) {
-       krb5_use_keytype(kcontext,
+       krb5_use_enctype(kcontext,
                         &master_encblock,
-                        (krb5_keytype) inkeys[i].key_data_type[0]);
+                        (krb5_enctype) inkeys[i].key_data_type[0]);
        if (!(kret = krb5_dbe_create_key_data(kcontext, &loser))) {
-           tmpkey.keytype = inkeys[i].key_data_type[0];
+           tmpkey.enctype = inkeys[i].key_data_type[0];
            tmpkey.length = inkeys[i].key_data_length[0];
            if (tmpkey.contents = (krb5_octet *) malloc((size_t)tmpkey.length))
                memcpy(tmpkey.contents,
@@ -1045,9 +1045,9 @@ key_decrypt_keys(kcontext, dbentp, nkeysp, inkeys, outkeysp)
     ndone = 0;
     nkeys = *nkeysp;
     for (i=0; i<nkeys; i++) {
-       krb5_use_keytype(kcontext,
+       krb5_use_enctype(kcontext,
                         &master_encblock,
-                        (krb5_keytype) inkeys[i].key_data_type[0]);
+                        (krb5_enctype) inkeys[i].key_data_type[0]);
        if (!(kret = krb5_dbe_create_key_data(kcontext, &loser))) {
            if (kret = krb5_dbekd_decrypt_key_data(kcontext,
                                                   &master_encblock,
@@ -1056,7 +1056,7 @@ key_decrypt_keys(kcontext, dbentp, nkeysp, inkeys, outkeysp)
                                                   &salt))
                break;
            loser.key_data[i].key_data_ver = KRB5_KDB_V1_KEY_DATA_ARRAY;
-           loser.key_data[i].key_data_type[0] = tmpkey.keytype;
+           loser.key_data[i].key_data_type[0] = tmpkey.enctype;
            loser.key_data[i].key_data_length[0] = (krb5_int16) tmpkey.length;
            loser.key_data[i].key_data_contents[0] = tmpkey.contents;
            loser.key_data[i].key_data_kvno = inkeys[i].key_data_kvno;
@@ -1110,7 +1110,7 @@ key_pwd_is_weak(kcontext, dbentp, string)
                              &key_list);
     if (!kret) {
        for (i=0; i<num_keys; i++) {
-           if ((key_list[i].key_data_type[0] == KEYTYPE_DES_CBC_MD5) &&
+           if ((key_list[i].key_data_type[0] == ENCTYPE_DES_CBC_MD5) &&
                (key_list[i].key_data_length[0] == KRB5_MIT_DES_KEYSIZE) &&
                mit_des_is_weak_key(key_list[i].key_data_contents[0])) {
                weakness = 1;
@@ -1228,7 +1228,7 @@ key_dbent_to_keysalts(dbentp, nentsp, ksentsp)
                                            dbentp->key_data[i].
                                                key_data_type[1]))
                    continue;
-               ksp[num].ks_keytype = dbentp->key_data[i].key_data_type[0];
+               ksp[num].ks_enctype = dbentp->key_data[i].key_data_type[0];
                ksp[num].ks_salttype = dbentp->key_data[i].key_data_type[1];
                num++;
            }
index ce3c145afb8234a2e765ebd0631414115b100d85..bb63cca415fae3d26056885215b7fc35f50b3b56 100644 (file)
 #include "kadm5_defs.h"
 
 #ifdef LANGUAGES_SUPPORTED
-static const char *usage_format =      "%s: usage is %s [-a aclfile] [-d database] [-m]\n\t[-k mkeytype] [-l langlist] [-p portnum] [-r realm] [-s stash] [-t timeout] [-n]\n\t[-D dbg] [-M mkeyname] [-T ktabname].\n";
+static const char *usage_format =      "%s: usage is %s [-a aclfile] [-d database] [-m]\n\t[-k menctype] [-l langlist] [-p portnum] [-r realm] [-s stash] [-t timeout] [-n]\n\t[-D dbg] [-M mkeyname] [-T ktabname].\n";
 static const char *getopt_string =     "a:d:e:k:l:mnp:r:t:D:M:T:";
 #else  /* LANGUAGES_SUPPORTED */
-static const char *usage_format =      "%s: usage is %s [-a aclfile] [-d database] [-m]\n\t[-k mkeytype] [-p portnum] [-r realm] [-s stash] [-t timeout] [-n]\n\t[-D dbg] [-M mkeyname] [-T ktabname].\n";
+static const char *usage_format =      "%s: usage is %s [-a aclfile] [-d database] [-m]\n\t[-k menctype] [-p portnum] [-r realm] [-s stash] [-t timeout] [-n]\n\t[-D dbg] [-M mkeyname] [-T ktabname].\n";
 static const char *getopt_string =     "a:d:e:k:mnp:r:t:D:M:T:";
 #endif /* LANGUAGES_SUPPORTED */
 static const char *fval_not_number =   "%s: value (%s) specified for -%c is not numeric.\n";
@@ -136,7 +136,7 @@ main(argc, argv)
      * kadmind5        [-a aclfile]            <acl file>
      *                 [-d database]           <database file>
      *                 [-e enctype]            <encryption type>
-     *                 [-k masterkeytype]      <master key type>
+     *                 [-k masterenctype]      <master key type>
      *                 [-l languagelist]       <language list>
      *                 [-m]                    <manual master key entry>
      *                 [-n]                    <do not fork/disassociate>
@@ -268,8 +268,8 @@ main(argc, argv)
            master_key_name = strdup(rparams->realm_mkey_name);
 
        /* Get the value for the master key type */
-       if (rparams->realm_keytype_valid)
-           key_type = rparams->realm_keytype;
+       if (rparams->realm_enctype_valid)
+           key_type = rparams->realm_enctype;
 
        /* Get the value for the port */
        if (rparams->realm_kadmind_port_valid)