Commit b705a764 authored by Libor Peltan's avatar Libor Peltan

offline ksk: fixed keymgr show-offline

parent 464afebc
......@@ -839,7 +839,7 @@ int kasp_db_load_offline_records(kasp_db_t *db, const knot_dname_t *for_dname,
goto cleanup;
}
if (key_class(&key) != KASPDBKEY_OFFLINE_RECORDS ||
knot_dname_cmp((const knot_dname_t *)key.data + 1, r->rrsig.owner) != 0) {
knot_dname_cmp((const knot_dname_t *)key.data + 1, for_dname) != 0) {
ret = KNOT_ENOENT;
goto cleanup;
}
......
......@@ -105,7 +105,7 @@ int key_records_dump(char **buf, size_t *buf_size, const key_records_t *r)
ret = knot_rrset_txt_dump(&r->rrsig, buf, buf_size, &KNOT_DUMP_STYLE_DEFAULT);
total += ret;
}
if (ret >= 0 && total < *buf_size) {
if (ret >= 0 && total > *buf_size) {
free(*buf);
*buf_size = total;
*buf = malloc(*buf_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment