hdb: Fix crash when expected KR is missing
This commit is contained in:
@@ -995,6 +995,8 @@ derive_keys(krb5_context context,
|
|||||||
|
|
||||||
/* Installing keys invalidates `ckr', so we copy it */
|
/* Installing keys invalidates `ckr', so we copy it */
|
||||||
ret = hdb_entry_get_key_rotation(context, &h->entry, &ckr);
|
ret = hdb_entry_get_key_rotation(context, &h->entry, &ckr);
|
||||||
|
if (!ckr)
|
||||||
|
return ret;
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = copy_HDB_Ext_KeyRotation(ckr, &kr);
|
ret = copy_HDB_Ext_KeyRotation(ckr, &kr);
|
||||||
}
|
}
|
||||||
|
@@ -246,6 +246,9 @@ hdb_remove_base_keys(krb5_context context,
|
|||||||
size_t i, k;
|
size_t i, k;
|
||||||
|
|
||||||
ret = hdb_entry_get_key_rotation(context, e, &ckr);
|
ret = hdb_entry_get_key_rotation(context, e, &ckr);
|
||||||
|
if (!ckr)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/*
|
/*
|
||||||
* Changing the entry's extensions invalidates extensions obtained
|
* Changing the entry's extensions invalidates extensions obtained
|
||||||
|
Reference in New Issue
Block a user