krb5_int32 kvno,
krb5_key_data **kdatap);
-krb5_error_code
-krb5_def_store_mkey( krb5_context context,
- char *keyfile,
- krb5_principal mname,
- krb5_kvno kvno,
- krb5_keyblock *key,
- char *master_pwd);
-
krb5_error_code
krb5_def_store_mkey_list( krb5_context context,
char *keyfile,
krb5_error_code (*get_master_key_list)(krb5_context kcontext,
krb5_keylist_node **keylist);
- /*
- * Optional with default: Save a master keyblock into the stash file
- * db_arg. master_pwd indicates the password used to derive the keyblock,
- * if it is known. mname is the name of the master principal for the
- * realm.
- *
- * The default implementation ignores master_pwd and saves the master key
- * in a keytab-format file.
- */
- krb5_error_code (*store_master_key)(krb5_context kcontext, char *db_arg,
- krb5_principal mname, krb5_kvno kvno,
- krb5_keyblock *key, char *master_pwd);
-
/*
* Optional with default: Retrieve a master keyblock from the stash file
* db_args, filling in *key and *kvno. mname is the name of the master
lib->vftabl.dbe_search_enctype = krb5_dbe_def_search_enctype;
if (lib->vftabl.change_pwd == NULL)
lib->vftabl.change_pwd = krb5_dbe_def_cpw;
- if (lib->vftabl.store_master_key == NULL)
- lib->vftabl.store_master_key = krb5_def_store_mkey;
if (lib->vftabl.promote_db == NULL)
lib->vftabl.promote_db = krb5_def_promote_db;
if (lib->vftabl.decrypt_key_data == NULL)
krb5_kvno kvno,
krb5_keyblock * key, char *master_pwd)
{
- krb5_error_code status = 0;
- kdb_vftabl *v;
+ krb5_keylist_node list;
- status = get_vftabl(kcontext, &v);
- if (status)
- return status;
- if (v->store_master_key == NULL)
- return KRB5_KDB_DBTYPE_NOSUP;
- return v->store_master_key(kcontext, keyfile, mname, kvno, key,
- master_pwd);
+ list.kvno = kvno;
+ list.keyblock = *key;
+ list.next = NULL;
+ return krb5_db_store_master_key_list(kcontext, keyfile, mname, &list,
+ master_pwd);
}
krb5_error_code
return retval;
}
-krb5_error_code
-krb5_def_store_mkey(krb5_context context,
- char *keyfile,
- krb5_principal mname,
- krb5_kvno kvno,
- krb5_keyblock *key,
- char *master_pwd)
-{
- krb5_keylist_node list;
-
- list.kvno = kvno;
- list.keyblock = *key;
- list.next = NULL;
- return krb5_def_store_mkey_list(context, keyfile, mname, &list,
- master_pwd);
-}
-
static krb5_error_code
krb5_db_def_fetch_mkey_stash(krb5_context context,
const char *keyfile,
krb5_db_iter_policy
krb5_db_delete_policy
krb5_db_free_policy
-krb5_def_store_mkey
krb5_def_store_mkey_list
krb5_db_promote
ulog_map
/* free */ krb5_db2_free,
/* set_master_key_list */ wrap_krb5_db2_set_mkey_list,
/* get_master_key_list */ wrap_krb5_db2_get_mkey_list,
- /* blah blah blah */ 0,0,0,0,0,0,
+ /* blah blah blah */ 0,0,0,0,0,
/* promote_db */ wrap_krb5_db2_promote_db,
0, 0,
/* invoke */ wrap_krb5_db2_invoke
/* optional functions */
/* set_master_key_list */ krb5_ldap_set_mkey_list,
/* get_master_key_list */ krb5_ldap_get_mkey_list,
- /* store_master_key */ NULL,
/* fetch_master_key */ NULL /* krb5_ldap_fetch_mkey */,
/* fetch_master_key_list */ NULL,
/* store_master_key_list */ NULL,