mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Handle deprecated 'trusted-keys' style anchors
This commit is contained in:
@@ -615,6 +615,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||
INITIAL_DS,
|
||||
STATIC_DS,
|
||||
TRUSTED } anchortype;
|
||||
const cfg_obj_t *obj;
|
||||
|
||||
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
||||
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
|
||||
@@ -647,7 +648,15 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||
rdata3 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata3"));
|
||||
|
||||
/* What type of trust anchor is this? */
|
||||
atstr = cfg_obj_asstring(cfg_tuple_get(key, "anchortype"));
|
||||
obj = cfg_tuple_get(key, "anchortype");
|
||||
if (cfg_obj_isvoid(obj)) {
|
||||
/*
|
||||
* "anchortype" is not defined, this must be a static-key
|
||||
* configured with trusted-keys.
|
||||
*/
|
||||
anchortype = STATIC_KEY;
|
||||
} else {
|
||||
atstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(atstr, "static-key") == 0) {
|
||||
anchortype = STATIC_KEY;
|
||||
} else if (strcasecmp(atstr, "static-ds") == 0) {
|
||||
@@ -663,6 +672,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||
result = ISC_R_FAILURE;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
isc_buffer_init(&databuf, data, sizeof(data));
|
||||
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
|
||||
|
Reference in New Issue
Block a user