* cpw.c, dump.c, dumpv4.c, kdb5_edit.c, loadv4.c :
authorChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 18:59:17 +0000 (18:59 +0000)
committerChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 18:59:17 +0000 (18:59 +0000)
s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g

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

src/admin/edit/ChangeLog
src/admin/edit/cpw.c
src/admin/edit/dump.c
src/admin/edit/dumpv4.c
src/admin/edit/kdb5_edit.c
src/admin/edit/loadv4.c

index ecd3eed00fed4799b08825c28de50a67fc4ea6be..5814b014604597e3d4c667a1e803c476436492c1 100644 (file)
@@ -1,3 +1,7 @@
+Wed Sep 06 14:20:57 1995   Chris Provenzano (proven@mit.edu)
+
+        * cpw.c, dump.c, dumpv4.c, kdb5_edit.c, loadv4.c : 
+               s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g
 
 Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)
 
index efd023c928c568ea95dcdc945faa44bfbe0b319e..4dacbc63fe8eccb9819eada82fdb819fa50d26a4 100644 (file)
@@ -51,7 +51,7 @@ extern char *krb5_default_pwd_prompt1, *krb5_default_pwd_prompt2;
 extern krb5_boolean dbactive;
 extern FILE *scriptfile;
 
-static krb5_key_salt_tuple ks_tuple_rnd_def[] = {{ KEYTYPE_DES_CBC_CRC, 0 }};
+static krb5_key_salt_tuple ks_tuple_rnd_def[] = {{ ENCTYPE_DES_CBC_CRC, 0 }};
 static int ks_tuple_rnd_def_count = 1;
 
 static void
@@ -180,7 +180,7 @@ void change_rnd_key(argc, argv)
     }
 }
 
-static krb5_key_salt_tuple ks_tuple_default[] = {{ KEYTYPE_DES_CBC_CRC, 0 }};
+static krb5_key_salt_tuple ks_tuple_default[] = {{ ENCTYPE_DES_CBC_CRC, 0 }};
 static int ks_tuple_count_default = 1;
 
 void 
index bbf2d09d071ce341fef08f4e900d8876323f9e17..c0aaa72ee5459d8eb47a5c0386e2e62a9d3d2e37 100644 (file)
@@ -275,9 +275,9 @@ name_matches(name, arglist)
 }
 \f
 static krb5_error_code
-find_keytype(dbentp, keytype, salttype, kentp)
+find_enctype(dbentp, enctype, salttype, kentp)
     krb5_db_entry      *dbentp;
-    krb5_keytype       keytype;
+    krb5_enctype       enctype;
     krb5_int32         salttype;
     krb5_key_data      **kentp;
 {
@@ -288,7 +288,7 @@ find_keytype(dbentp, keytype, salttype, kentp)
     maxkvno = -1;
     datap = (krb5_key_data *) NULL;
     for (i=0; i<dbentp->n_key_data; i++) {
-       if ((dbentp->key_data[i].key_data_type[0] == keytype) &&
+       if ((dbentp->key_data[i].key_data_type[0] == enctype) &&
            ((dbentp->key_data[i].key_data_type[1] == salttype) ||
             (salttype < 0))) {
            maxkvno = dbentp->key_data[i].key_data_kvno;
@@ -397,12 +397,12 @@ dump_k5beta_iterator(ptr, entry)
        /*
         * Find the 'primary' key and the 'alternate' key.
         */
-       if ((retval = find_keytype(entry,
-                                  KEYTYPE_DES_CBC_CRC,
+       if ((retval = find_enctype(entry,
+                                  ENCTYPE_DES_CBC_CRC,
                                   KRB5_KDB_SALTTYPE_NORMAL,
                                   &pkey)) &&
-           (retval = find_keytype(entry,
-                                  KEYTYPE_DES_CBC_CRC,
+           (retval = find_enctype(entry,
+                                  ENCTYPE_DES_CBC_CRC,
                                   KRB5_KDB_SALTTYPE_V4,
                                   &akey))) {
            fprintf(stderr, nokeys_err, arg->programname, name);
index 286e5180e7f40e3e1d06767788467fe1ca50229c..84c501cc6a649ace9f8cb7c811eaa5a6726067e5 100644 (file)
@@ -334,7 +334,7 @@ int handle_keys(arg)
        exit(1);
     }
 
-    krb5_use_keytype(edit_context, &master_encblock, DEFAULT_KDC_KEYTYPE);
+    krb5_use_enctype(edit_context, &master_encblock, DEFAULT_KDC_ENCTYPE);
     if (retval = krb5_db_fetch_mkey(edit_context, master_princ, 
                                    &master_encblock, 0,
                                    0, (char *) NULL, 0, &master_keyblock)) {
@@ -367,7 +367,7 @@ handle_one_key(arg, v5master, v5key, v4key)
        return retval;
 
     /* v4v5key.contents = (krb5_octet *)v4key; */
-    /* v4v5key.keytype = KEYTYPE_DES; */
+    /* v4v5key.enctype = ENCTYPE_DES; */
     /* v4v5key.length = sizeof(v4key); */
 
     memcpy(v4key, v5plainkey.contents, sizeof(des_cblock));
index 90a6b2bea27cf6a01e5f7125a85ce3f8ca99b929..98f6998d79dfefa0d858f0b412465214883ad907 100644 (file)
@@ -78,7 +78,7 @@ usage(who, status)
     fprintf(stderr,
            "usage: %s [-d dbpathname] [-r realmname] [-R request ]\n",
            who);
-    fprintf(stderr, "\t [-k keytype] [-M mkeyname]\n");
+    fprintf(stderr, "\t [-k enctype] [-M mkeyname]\n");
     exit(status);
 }
 
@@ -107,7 +107,7 @@ char *kdb5_edit_Init(argc, argv)
     krb5_error_code retval;
     char *dbname = (char *) NULL;
     char *defrealm;
-    int keytypedone = 0;
+    int enctypedone = 0;
     extern krb5_kt_ops krb5_ktf_writable_ops;
     char       *request = NULL;
     krb5_realm_params *rparams;
@@ -147,10 +147,10 @@ char *kdb5_edit_Init(argc, argv)
            request = optarg;
            break;
        case 'k':
-           if (!krb5_string_to_keytype(optarg, &master_keyblock.keytype))
-               keytypedone++;
+           if (!krb5_string_to_enctype(optarg, &master_keyblock.enctype))
+               enctypedone++;
            else
-               com_err(argv[0], 0, "%s is an invalid keytype", optarg);
+               com_err(argv[0], 0, "%s is an invalid enctype", optarg);
            break;
        case 'M':                       /* master key name in DB */
            mkey_name = optarg;
@@ -191,9 +191,9 @@ char *kdb5_edit_Init(argc, argv)
            mkey_name = strdup(rparams->realm_mkey_name);
 
        /* Get the value for the master key type */
-       if (rparams->realm_keytype_valid && !keytypedone) {
-           master_keyblock.keytype = rparams->realm_keytype;
-           keytypedone++;
+       if (rparams->realm_enctype_valid && !enctypedone) {
+           master_keyblock.enctype = rparams->realm_enctype;
+           enctypedone++;
        }
 
        /* Get the value for the stashfile */
@@ -234,20 +234,20 @@ char *kdb5_edit_Init(argc, argv)
     if (!dbname)
        dbname = DEFAULT_KDB_FILE;
 
-    if (!keytypedone)
-       master_keyblock.keytype = DEFAULT_KDC_KEYTYPE;
+    if (!enctypedone)
+       master_keyblock.enctype = DEFAULT_KDC_ENCTYPE;
 
-    if (!valid_keytype(master_keyblock.keytype)) {
+    if (!valid_enctype(master_keyblock.enctype)) {
        char tmp[32];
-       if (krb5_keytype_to_string(master_keyblock.keytype, tmp, sizeof(tmp)))
+       if (krb5_enctype_to_string(master_keyblock.enctype, tmp, sizeof(tmp)))
            com_err(argv[0], KRB5_PROG_KEYTYPE_NOSUPP,
-                   "while setting up keytype %d", master_keyblock.keytype);
+                   "while setting up enctype %d", master_keyblock.enctype);
        else
            com_err(argv[0], KRB5_PROG_KEYTYPE_NOSUPP, tmp);
        exit(1);
     }
 
-    krb5_use_keytype(edit_context, &master_encblock, master_keyblock.keytype);
+    krb5_use_enctype(edit_context, &master_encblock, master_keyblock.enctype);
 
     if (cur_realm) {
        if ((retval = krb5_set_default_realm(edit_context, cur_realm))) {
@@ -460,7 +460,7 @@ set_dbname_help(pname, dbname)
            return(1);
        }
        retval = krb5_string_to_key(edit_context, &master_encblock, 
-                                   master_keyblock.keytype,
+                                   master_keyblock.enctype,
                                    &master_keyblock, &pwd, &scratch);
        if (retval) {
            com_err(pname, retval,
@@ -803,7 +803,7 @@ void extract_v4_srvtab(argc, argv)
            exit_status++;
            goto cleanall;
        }
-       if (key.keytype != 1) {
+       if (key.enctype != 1) {
                com_err(argv[0], 0, "%s does not have a DES key!", pname);
                exit_status++;
                memset((char *)key.contents, 0, key.length);
index 5ae9400b87b4fd0a9d042dbcf4cb0ca7179c8116..e72c7996a751bfb9f1676c7e620bc9d645de1ebd 100644 (file)
@@ -90,7 +90,7 @@ usage(who, status)
 char *who;
 int status;
 {
-    fprintf(stderr, "usage: %s [-d v5dbpathname] [-t] [-n] [-r realmname] [-K] [-k keytype]\n\
+    fprintf(stderr, "usage: %s [-d v5dbpathname] [-t] [-n] [-r realmname] [-K] [-k enctype]\n\
 \t[-M mkeyname] -f inputfile\n",
            who);
     return;
@@ -142,7 +142,7 @@ char *argv[];
     char *mkey_name = 0;
     char *mkey_fullname;
     char *defrealm;
-    int keytypedone = 0;
+    int enctypedone = 0;
     int v4manual = 0;
     int read_mkey = 0;
     int tempdb = 0;
@@ -183,11 +183,11 @@ char *argv[];
            verbose = 1;
        }
        else if (!strcmp(argv[op_ind], "-k") && ((argc - op_ind) >= 2)) {
-           if (!krb5_string_to_keytype(argv[op_ind+1],
-                                       &master_keyblock.keytype))
-               keytypedone++;
+           if (!krb5_string_to_enctype(argv[op_ind+1],
+                                       &master_keyblock.enctype))
+               enctypedone++;
            else
-               com_err(argv[0], 0, "%s is an invalid keytype",
+               com_err(argv[0], 0, "%s is an invalid enctype",
                        argv[op_ind+1]);
            op_ind++;
        }
@@ -229,9 +229,9 @@ char *argv[];
            mkey_name = strdup(rparams->realm_mkey_name);
 
        /* Get the value for the master key type */
-       if (rparams->realm_keytype_valid && !keytypedone) {
-           master_keyblock.keytype = rparams->realm_keytype;
-           keytypedone++;
+       if (rparams->realm_enctype_valid && !enctypedone) {
+           master_keyblock.enctype = rparams->realm_enctype;
+           enctypedone++;
        }
 
        /* Get the value for the stashfile */
@@ -262,16 +262,16 @@ char *argv[];
        return;
     }
 
-    if (!keytypedone)
-       master_keyblock.keytype = DEFAULT_KDC_KEYTYPE;
+    if (!enctypedone)
+       master_keyblock.enctype = DEFAULT_KDC_ENCTYPE;
 
-    if (!valid_keytype(master_keyblock.keytype)) {
+    if (!valid_enctype(master_keyblock.enctype)) {
        com_err(PROGNAME, KRB5_PROG_KEYTYPE_NOSUPP,
-               "while setting up keytype %d", master_keyblock.keytype);
+               "while setting up enctype %d", master_keyblock.enctype);
        return;
     }
 
-    krb5_use_keytype(context, &master_encblock, master_keyblock.keytype);
+    krb5_use_enctype(context, &master_encblock, master_keyblock.enctype);
 
     /* If the user has not requested locking, don't modify an existing database. */
     if (! tempdb) {
@@ -530,7 +530,7 @@ Principal *princ;
 
     v4v5key.magic = KV5M_KEYBLOCK;
     v4v5key.contents = (krb5_octet *)v4key;
-    v4v5key.keytype = KEYTYPE_DES_CBC_CRC;
+    v4v5key.enctype = ENCTYPE_DES_CBC_CRC;
     v4v5key.length = sizeof(v4key);
 
     retval = krb5_dbe_create_key_data(context, &entry);