+Thu Aug 10 14:48:26 EDT 1995 Paul Park (pjpark@mit.edu)
+ * kadm_funcs.c - Add kadm_find_keytype() to find a particular key/salt
+ pair. Use this to find keys instead of assuming that the
+ right one's in the first slot.
+ Fix transposed arguments to strncpy().
+ Handle mod_princ_data stuff.
+ Supply saltblock to encrypt_key_data().
+ * admin_server, kadm_ser_wrap.c - Use kadm_find_keytype() to find keys.
+
+
Mon Aug 7 13:30:46 EDT 1995 Paul Park (pjpark@mit.edu)
* admin_server,kadm_funcs,kadm_ser_wrap.c - Brute force substitutions
to get this to compile.
krb5_db_entry sprinc_entries;
krb5_boolean more;
krb5_keyblock cpw_skey;
+ krb5_key_data *kdatap;
int status;
#ifndef NOENCRYPTION
cleanexit(2);
}
+ status = kadm_find_keytype(&sprinc_entries, KEYTYPE_DES, -1, &kdatap);
+ if (status) {
+ syslog(LOG_ERR, "find keytype failed: %s", error_message(status));
+ cleanexit(1);
+ }
+
status = krb5_dbekd_decrypt_key_data(kadm_context,
&server_parm.master_encblock,
- &sprinc_entries.key_data[0],
+ kdatap,
&cpw_skey,
(krb5_keysalt *) NULL);
if (status) {
krb5_boolean more;
krb5_db_entry master_entry;
krb5_enctype kdc_etype = DEFAULT_KDC_ETYPE;
+ krb5_key_data *kdatap;
if (gethostname(hostname, sizeof(hostname)))
return KADM_NO_HOSTNAME;
&master_entry, &numfound, &more);
if (retval || more || !numfound)
return KADM_NO_VERI;
+
+ retval = kadm_find_keytype(&master_entry,
+ KEYTYPE_DES,
+ -1,
+ &kdatap);
+ if (retval)
+ return KRB5_PROG_KEYTYPE_NOSUPP;
server_parm.max_life = master_entry.max_life;
server_parm.max_rlife = master_entry.max_renewable_life;
server_parm.expiration = master_entry.expiration;
- server_parm.mkvno = master_entry.key_data[0].key_data_kvno;
+ server_parm.mkvno = kdatap->key_data_kvno;
/* don't set flags, as master has some extra restrictions
(??? quoted from kdb_edit.c) */
krb5_db_free_principal(kadm_context, &master_entry, numfound);