--- /dev/null
+/*
+ * 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";
+ };
+};
--- /dev/null
+/*
+ * 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";
+ file "example1.db";
+ };
+};
+
+view "example2" {
+ match-clients { key "keyforview2"; };
+
+ zone "example.net" {
+ type primary;
+ dnssec-policy "insecure";
+ file "example2.db";
+ };
+};
file "dnssec-none.db";
dnssec-policy "none";
};
+ zone "dnssec-view1" {
+ type master;
+ file "dnssec-view41.db";
+ dnssec-policy "test";
+ };
+ zone "dnssec-view2" {
+ type master;
+ file "dnssec-view42.db";
+ };
+ zone "dnssec-view3" {
+ type master;
+ file "dnssec-view43.db";
+ dnssec-policy "none";
+ key-directory "keys";
+ };
+ zone "dnssec-view4" {
+ type master;
+ file "dnssec-view44.db";
+ dnssec-policy "none";
+ };
dnssec-policy "default";
+ key-directory ".";
+};
+view "fifth" {
+ zone "dnssec-view1" {
+ type master;
+ file "dnssec-view51.db";
+ dnssec-policy "test";
+ };
+ zone "dnssec-view2" {
+ type master;
+ file "dnssec-view52.db";
+ dnssec-policy "test";
+ key-directory "keys";
+ };
+ zone "dnssec-view3" {
+ type master;
+ file "dnssec-view53.db";
+ dnssec-policy "default";
+ key-directory "keys";
+ };
+ zone "dnssec-view4" {
+ type master;
+ file "dnssec-view54.db";
+ dnssec-policy "none";
+ };
+ key-directory ".";
};
view "chaos" chaos {
zone "hostname.bind" chaos {
dnssec-default IN fourth master
dnssec-inherit IN fourth master
dnssec-none IN fourth master
+dnssec-view1 IN fourth master
+dnssec-view2 IN fourth master
+dnssec-view3 IN fourth master
+dnssec-view4 IN fourth master
+dnssec-view1 IN fifth master
+dnssec-view2 IN fifth master
+dnssec-view3 IN fifth master
+dnssec-view4 IN fifth master
hostname.bind chaos chaos master
status=0
n=0
+mkdir keys
+
n=`expr $n + 1`
echo_i "checking that named-checkconf handles a known good config ($n)"
ret=0
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
+rmdir keys
+
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1