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);
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);
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)) {
&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];
}
\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)
}
\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)
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;
*/
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];
}
/*
* 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);
/*
}
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,
* 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)) {
*/
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;
}
}
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)) {
*/
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;
}
}
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,
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,
&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;
&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;
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++;
}
#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";
* 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>
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)