* decrypt_key.c, encrypt_key.c, fetch_mkey.c, kdb_compat.c,
authorChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 19:10:10 +0000 (19:10 +0000)
committerChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 19:10:10 +0000 (19:10 +0000)
* kdb_cpw.c, kdb_xdr.c, store_mkey.c, t_kdb.c :
s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g

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

src/lib/kdb/ChangeLog
src/lib/kdb/decrypt_key.c
src/lib/kdb/encrypt_key.c
src/lib/kdb/fetch_mkey.c
src/lib/kdb/kdb_compat.h
src/lib/kdb/kdb_cpw.c
src/lib/kdb/kdb_xdr.c
src/lib/kdb/store_mkey.c
src/lib/kdb/t_kdb.c

index 1940896749a2458fa37028699f80eea8174e1fd1..88d23c947f9fc16fa3207f63cba54fe183657807 100644 (file)
@@ -1,3 +1,8 @@
+Wed Sep 06 14:20:57 1995   Chris Provenzano (proven@mit.edu)
+
+        * decrypt_key.c, encrypt_key.c, fetch_mkey.c, kdb_compat.c,
+       * kdb_cpw.c, kdb_xdr.c, store_mkey.c, t_kdb.c : 
+               s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g
 
 Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)
 
index 362f832f394c083809472098187ce81898284b48..a1762fbeca6b16274c0a0920e6b624a57b265a68 100644 (file)
@@ -45,7 +45,7 @@ krb5_dbekd_decrypt_key_data(context, eblock, key_data, keyblock, keysalt)
     krb5_octet         * ptr;
 
     keyblock->magic = KV5M_KEYBLOCK;
-    keyblock->keytype = key_data->key_data_type[0];
+    keyblock->enctype = key_data->key_data_type[0];
 
     /* Decrypt key_data_contents */
     if ((keyblock->contents = (krb5_octet *)malloc(krb5_encrypt_size(
index 6e3f9b7591c9145a4d8028768493cc35371d41ee..ea7d17ca78a74f72b720986a4706015b0d5ec390 100644 (file)
@@ -58,7 +58,7 @@ krb5_dbekd_encrypt_key_data(context, eblock, keyblock, keysalt, keyver,key_data)
      * The First element of the type/length/contents 
      * fields is the key type/length/contents
      */
-    key_data->key_data_type[0] = keyblock->keytype;
+    key_data->key_data_type[0] = keyblock->enctype;
     key_data->key_data_length[0] = krb5_encrypt_size(keyblock->length, 
                                                     eblock->crypto_entry) + 2;
 
index 0577d5eae41088a0e0cc055001c22c92a16bca04..9f8d533c18238a025bebad5c4b3063a52486f6bf 100644 (file)
@@ -35,7 +35,7 @@ char *krb5_mkey_pwd_prompt2 = KRB5_KDC_MKEY_2;
 /*
  * Get the KDC database master key from somewhere, filling it into *key.
  *
- * key->keytype should be set to the desired key type.
+ * key->enctype should be set to the desired key type.
  *
  * if fromkeyboard is TRUE, then the master key is read as a password
  * from the user's terminal.  In this case,
@@ -84,7 +84,7 @@ krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, keyfile, salt, k
                if (retval)
                        return retval;
        }
-       retval = krb5_string_to_key(context, eblock, key->keytype, key, &pwd,
+       retval = krb5_string_to_key(context, eblock, key->enctype, key, &pwd,
                                    salt ? salt : &scratch);
        if (!salt)
                krb5_xfree(scratch.data);
@@ -93,7 +93,7 @@ krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, keyfile, salt, k
 
     } else {
        /* from somewhere else */
-        krb5_ui_2 keytype;
+        krb5_ui_2 enctype;
        char defkeyfile[MAXPATHLEN+1];
        krb5_data *realm = krb5_princ_realm(context, mname);
        FILE *kf;
@@ -112,11 +112,11 @@ krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, keyfile, salt, k
        if (!(kf = fopen((keyfile) ? keyfile : defkeyfile, "r")))
 #endif
            return KRB5_KDB_CANTREAD_STORED;
-       if (fread((krb5_pointer) &keytype, 2, 1, kf) != 1) {
+       if (fread((krb5_pointer) &enctype, 2, 1, kf) != 1) {
            retval = KRB5_KDB_CANTREAD_STORED;
            goto errout;
        }
-       if (keytype != key->keytype) {
+       if (enctype != key->enctype) {
            retval = KRB5_KDB_BADSTORED_MKEY;
            goto errout;
        }
index 97716da507bd00490edaab19670a585fe46b1975..2381d955437600113a03db2bf248698971ae96b3 100644 (file)
@@ -26,7 +26,7 @@
 
 
 typedef struct _old_krb5_encrypted_keyblock {
-    krb5_keytype keytype;
+    krb5_enctype enctype;
     int length;
     krb5_octet *contents;
 } old_krb5_encrypted_keyblock;
index 990d3e8e69b3b5b30cb8d3072f0a56e02de4c9e7..4b6dcd4ba976e5f5c4a11b290a16beb4cf281d65 100644 (file)
@@ -124,7 +124,7 @@ add_key_rnd(context, master_eblock, ks_tuple, ks_tuple_count, db_entry, kvno)
         */
        found = 0;
        for (j = 0; j < i; j++) {
-           if (ks_tuple[j].ks_keytype == ks_tuple[i].ks_keytype) {
+           if (ks_tuple[j].ks_enctype == ks_tuple[i].ks_enctype) {
                found = 1;
                break;
            }
@@ -137,13 +137,13 @@ add_key_rnd(context, master_eblock, ks_tuple, ks_tuple_count, db_entry, kvno)
        for (j = 0; j < krbtgt_entry.n_key_data; j++) {
             if ((krbtgt_entry.key_data[j].key_data_kvno == max_kvno) &&
                 (krbtgt_entry.key_data[j].key_data_type[0] == 
-                 ks_tuple[i].ks_keytype)) {
+                 ks_tuple[i].ks_enctype)) {
                break;
            }
        }
 
        if (j == krbtgt_entry.n_key_data) {
-           retval = KRB5_KDB_BAD_KEYTYPE;
+           retval = KRB5_KDB_BAD_ENCTYPE;
            goto add_key_rnd_err;
        }
 
@@ -155,7 +155,7 @@ add_key_rnd(context, master_eblock, ks_tuple, ks_tuple_count, db_entry, kvno)
        }
 
        /* Init key */
-       krb5_use_keytype(context, &krbtgt_eblock, ks_tuple[i].ks_keytype);
+       krb5_use_enctype(context, &krbtgt_eblock, ks_tuple[i].ks_enctype);
        if (retval = krb5_process_key(context,&krbtgt_eblock,&krbtgt_keyblock)){
            goto add_key_rnd_err;
        }
@@ -315,7 +315,7 @@ add_key_pwd(context, master_eblock, ks_tuple, ks_tuple_count, passwd,
         */
        found = 0;
        for (j = 0; j < i; j++) {
-           if ((ks_tuple[j].ks_keytype == ks_tuple[i].ks_keytype) &&
+           if ((ks_tuple[j].ks_enctype == ks_tuple[i].ks_enctype) &&
                (ks_tuple[j].ks_salttype == ks_tuple[i].ks_salttype)) {
                found = 1;
                break;
@@ -323,7 +323,7 @@ add_key_pwd(context, master_eblock, ks_tuple, ks_tuple_count, passwd,
        }
        if (found)
            continue;
-       krb5_use_keytype(context, &key_eblock, ks_tuple[i].ks_keytype);
+       krb5_use_enctype(context, &key_eblock, ks_tuple[i].ks_enctype);
        if (retval = krb5_dbe_create_key_data(context, db_entry)) 
            return(retval);
 
@@ -360,7 +360,7 @@ add_key_pwd(context, master_eblock, ks_tuple, ks_tuple_count, passwd,
        pwd.data = passwd;
        pwd.length = strlen(passwd);
        if (retval = krb5_string_to_key(context, &key_eblock, 
-                                       ks_tuple[i].ks_keytype, &key,
+                                       ks_tuple[i].ks_enctype, &key,
                                        &pwd, &key_salt.data))
            return(retval);
 
index 66cc23a349663bc728aebd4b2e12f9445daa7a26..6907f6d1e77c587f54a54dc684ae818dafbfde1d 100644 (file)
@@ -616,16 +616,16 @@ krb5_dbe_free_contents(context, entry)
 }
 
 /*
- * Given a particular keytype and optional salttype and kvno, find the
+ * Given a particular enctype and optional salttype and kvno, find the
  * most appropriate krb5_key_data entry of the database entry.
  *
  * If stype or kvno is negative, it is ignored.
  */
 krb5_error_code
-krb5_dbe_find_keytype(kcontext, dbentp, ktype, stype, kvno, kdatap)
+krb5_dbe_find_enctype(kcontext, dbentp, ktype, stype, kvno, kdatap)
     krb5_context       kcontext;
     krb5_db_entry      *dbentp;
-    krb5_keytype       ktype;
+    krb5_enctype       ktype;
     krb5_int32         stype;
     krb5_int32         kvno;
     krb5_key_data      **kdatap;
index a58d2fe7ea0798874f1120ba941a8907e09a8683..e63c611a4e0bd2b0df31a9a2f965fbf19598de12 100644 (file)
@@ -53,7 +53,7 @@ krb5_db_store_mkey(context, keyfile, mname, key)
 {
     FILE *kf;
     krb5_error_code retval = 0;
-    krb5_ui_2 keytype;
+    krb5_ui_2 enctype;
     char defkeyfile[MAXPATHLEN+1];
     krb5_data *realm = krb5_princ_realm(context, mname);
 #if HAVE_UMASK
@@ -83,8 +83,8 @@ krb5_db_store_mkey(context, keyfile, mname, key)
 #endif
        return errno;
     }
-    keytype = key->keytype;
-    if ((fwrite((krb5_pointer) &keytype,
+    enctype = key->enctype;
+    if ((fwrite((krb5_pointer) &enctype,
                2, 1, kf) != 1) ||
        (fwrite((krb5_pointer) &key->length,
                sizeof(key->length), 1, kf) != 1) ||
index 6d23b43d7811ff201e5ec6eb0a94162e2a50271f..fb80528c34e3c8ddc522a5c83f422c75d635caec 100644 (file)
@@ -531,13 +531,13 @@ do_testing(db, passes, verbose, timing, rcases, check, save_db, dontclean,
        goto goodbye;
 
     op = "converting master key";
-    krb5_use_keytype(kcontext, &master_encblock, DEFAULT_KDC_KEYTYPE);
-    master_keyblock.keytype = DEFAULT_KDC_KEYTYPE;
+    krb5_use_enctype(kcontext, &master_encblock, DEFAULT_KDC_ENCTYPE);
+    master_keyblock.enctype = DEFAULT_KDC_ENCTYPE;
     passwd.length = strlen(master_passwd);
     passwd.data = master_passwd;
     if (kret = krb5_string_to_key(kcontext,
                                  &master_encblock,
-                                 master_keyblock.keytype,
+                                 master_keyblock.enctype,
                                  &master_keyblock,
                                  &passwd,
                                  &salt_data))
@@ -585,7 +585,7 @@ do_testing(db, passes, verbose, timing, rcases, check, save_db, dontclean,
        goto goodbye;
 
 
-    stat_kb.keytype = DEFAULT_KDC_KEYTYPE;
+    stat_kb.enctype = DEFAULT_KDC_ENCTYPE;
     stat_kb.length = 8;
     stat_kb.contents = (krb5_octet *) "helpmeee";