Add checkconf tests for [#2463]
Add two tests to make sure named-checkconf catches key-directory issues where a zone in multiple views uses the same directory but has different dnssec-policies. One test sets the key-directory specifically, the other inherits the default key-directory (NULL, aka the working directory). Also update the good.conf test to allow zones in different views with the same key-directory if they use the same dnssec-policy. Also allow zones in different views with different key-directories if they use different dnssec-policies. Also allow zones in different views with the same key-directories if only one view uses a dnssec-policy (the other is set to "none"). Also allow zones in different views with the same key-directories if no views uses a dnssec-policy (zone in both views has the dnssec-policy set to "none").
This commit is contained in:
42
bin/tests/system/checkconf/bad-kasp-keydir1.conf
Normal file
42
bin/tests/system/checkconf/bad-kasp-keydir1.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
key "keyforview1" {
|
||||
algorithm "hmac-sha1";
|
||||
secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
|
||||
};
|
||||
|
||||
key "keyforview2" {
|
||||
algorithm "hmac-sha1";
|
||||
secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
|
||||
};
|
||||
|
||||
view "example1" {
|
||||
match-clients { key "keyforview1"; };
|
||||
|
||||
zone "example.net" {
|
||||
type primary;
|
||||
dnssec-policy "default";
|
||||
key-directory ".";
|
||||
file "example1.db";
|
||||
};
|
||||
};
|
||||
|
||||
view "example2" {
|
||||
match-clients { key "keyforview2"; };
|
||||
|
||||
zone "example.net" {
|
||||
type primary;
|
||||
dnssec-policy "insecure";
|
||||
key-directory ".";
|
||||
file "example2.db";
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user