Commit 501368eb authored by Daniel Salzman's avatar Daniel Salzman

Merge branch 'fix_shared_policy' into 'master'

dnssec shared policy: don't return a link to nonexistent key

Closes #589

See merge request !912
parents 1afeb7fc 837ef806
......@@ -649,6 +649,15 @@ int kasp_db_get_policy_last(kasp_db_t *db, const char *policy_string, knot_dname
free(*lp_zone);
free(*lp_keyid);
ret = KNOT_ENOMEM;
} else {
// check that the shared key ID really exists
key = make_key(KASPDBKEY_PARAMS, *lp_zone, *lp_keyid);
ret = db_api->find(txn, &key, &val, 0);
free_key(&key);
if (ret != KNOT_EOK) {
free(*lp_zone);
free(*lp_keyid);
}
}
}
}
......
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