xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/checkconf/bad-kasp-keydir3.conf.in (revision 901e7e84758515fbf39dfc064cb0b45ab146d8b0)
1/*
2 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3 *
4 * SPDX-License-Identifier: MPL-2.0
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0.  If a copy of the MPL was not distributed with this
8 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * See the COPYRIGHT file distributed with this work for additional
11 * information regarding copyright ownership.
12 */
13
14/*
15 * The zone in view "example1" inherits the key directory value from "options",
16 * but in view "example2" sets the key directory to the same value. This should
17 * be detected as an error because the zone is using different DNSSEC policies
18 * and should thus use different key directories.
19 */
20
21key "keyforview1" {
22	algorithm @DEFAULT_HMAC@;
23	secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
24};
25
26key "keyforview2" {
27	algorithm @DEFAULT_HMAC@;
28	secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
29};
30
31options {
32	key-directory "keys";
33};
34
35view "example1" {
36	match-clients { key "keyforview1"; };
37
38	zone "example.net" {
39		type primary;
40		/* key-directory inherited from options. */
41		dnssec-policy "default";
42		file "example1.db";
43	};
44};
45
46view "example2" {
47	match-clients { key "keyforview2"; };
48
49	zone "example.net" {
50		type primary;
51		dnssec-policy "insecure";
52		key-directory "keys";
53		file "example2.db";
54	};
55};
56