diff options
author | Sam Hartman <hartmans@mit.edu> | 2010-09-15 17:13:23 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 2010-09-15 17:13:23 +0000 |
commit | a063fe7e5c11900df005bb2875b27f8e284dfdba (patch) | |
tree | 36fe23e89c05a9727ccbf82059e3582a6938b4f0 /src/kadmin/server/ovsec_kadmd.c | |
parent | 4bcc98813080a3dabb94e31e974a6f74a81b2125 (diff) | |
download | krb5-a063fe7e5c11900df005bb2875b27f8e284dfdba.tar.gz krb5-a063fe7e5c11900df005bb2875b27f8e284dfdba.tar.xz krb5-a063fe7e5c11900df005bb2875b27f8e284dfdba.zip |
kdb: store mkey list in context and permit NULL mkey for kdb_dbe_decrypt_key_data
Previously, code needed to run a loop to find the current master key,
possibly fetch a new master key list and try finding the master key
again around each key decryption. This was not universally done;
there are cases where only the current master key was used. In
addition, the correct ideom for decrypting key data is too complicated
and is potentially unavailable to plugins that do not have access to
the master key. Instead, store the master key list in the dal_handle
whenever it is fetched and permit a NULL master key for
krb5_dbe_decrypt_key_data.
* Remove APIs for krb5_db_{get|set}_mkey_list
* krb5_db_fetch_mkey_list: memoize master key list in dal_handle
* krb5_db_free_mkey_list: don't free the memoized list; arrange for it to be freed later
* krb5_dbe_decrypt_key_data: Search for correct master key on NULL argument
* change call sites to take advantage
ticket: 6778
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24314 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/server/ovsec_kadmd.c')
-rw-r--r-- | src/kadmin/server/ovsec_kadmd.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/kadmin/server/ovsec_kadmd.c b/src/kadmin/server/ovsec_kadmd.c index 6d25a0fab..6b55273de 100644 --- a/src/kadmin/server/ovsec_kadmd.c +++ b/src/kadmin/server/ovsec_kadmd.c @@ -430,12 +430,6 @@ int main(int argc, char *argv[]) krb5_klog_syslog(LOG_ERR, "Can't set kdb keytab's internal context."); goto kterr; } - /* XXX master_keylist is in guts of lib/kadm5/server_kdb.c */ - ret = krb5_db_set_mkey_list(hctx, master_keylist); - if (ret) { - krb5_klog_syslog(LOG_ERR, "Can't set master key list for kdb keytab."); - goto kterr; - } ret = krb5_kt_register(context, &krb5_kt_kdb_ops); if (ret) { krb5_klog_syslog(LOG_ERR, "Can't register kdb keytab."); |