TGT_KEY /* special handling for tgt key */
};
-krb5_key_salt_tuple def_kslist = { KEYTYPE_DES_CBC_CRC, KRB5_KDB_SALTTYPE_NORMAL };
+krb5_key_salt_tuple def_kslist = { ENCTYPE_DES_CBC_CRC, KRB5_KDB_SALTTYPE_NORMAL };
struct realm_info {
krb5_deltat max_life;
char *who;
int status;
{
- fprintf(stderr, "usage: %s [-d dbpathname] [-r realmname] [-k keytype]\n\
+ fprintf(stderr, "usage: %s [-d dbpathname] [-r realmname] [-k enctype]\n\
\t[-M mkeyname]\n",
who);
exit(status);
char *mkey_fullname;
char *defrealm;
char *mkey_password = 0;
- int keytypedone = 0;
+ int enctypedone = 0;
krb5_data scratch, pwd;
krb5_context context;
krb5_realm_params *rparams;
realm = 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;
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 maximum ticket lifetime. */
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(context, &master_encblock, master_keyblock.keytype);
+ krb5_use_enctype(context, &master_encblock, master_keyblock.enctype);
retval = krb5_db_set_name(context, dbname);
if (!retval) retval = EEXIST;
exit(1);
}
retval = krb5_string_to_key(context, &master_encblock,
- master_keyblock.keytype, &master_keyblock,
+ master_keyblock.enctype, &master_keyblock,
&pwd, &scratch);
if (retval) {
com_err(argv[0], retval,
iargs = (struct iterate_args *) ptr;
kret = 0;
- krb5_use_keytype(iargs->ctx, iargs->rblock->eblock, ksent->ks_keytype);
+ krb5_use_enctype(iargs->ctx, iargs->rblock->eblock, ksent->ks_enctype);
if (!(kret = krb5_dbe_create_key_data(iargs->ctx, iargs->dbentp))) {
ind = iargs->dbentp->n_key_data-1;
if (!(kret = krb5_random_key(iargs->ctx,