/*
 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 *
 * SPDX-License-Identifier: MPL-2.0
 *
 * 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 https://mozilla.org/MPL/2.0/.
 *
 * See the COPYRIGHT file distributed with this work for additional
 * information regarding copyright ownership.
 */

options {
	query-source address 10.53.0.3;
	notify-source 10.53.0.3;
	transfer-source 10.53.0.3;
	port @PORT@;
	tls-port @TLSPORT@;
	pid-file "named.pid";
	listen-on { 10.53.0.3; };
	listen-on tls ephemeral { 10.53.0.3; };
	listen-on-v6 { none; };
	recursion no;
	dnssec-validation no;
	notify yes;
	include "dnstap.conf";
};

key rndc_key {
	secret "1234abcd8765";
	algorithm @DEFAULT_HMAC@;
};

controls {
	inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};

tls tls-example-primary {
	remote-hostname "srv01.crt01.example.com"; // enable Strict TLS
	ca-file "../CA/CA.pem";
};

zone "example" {
	type secondary;
	file "example.bk";
	allow-update-forwarding { 10.53.0.1; };
	primaries { 10.53.0.1 tls ephemeral; };
};

zone "example2" {
	type secondary;
	file "example2.bk";
	allow-update-forwarding { 10.53.0.1; };
	primaries { 10.53.0.1; };
};

zone "example3" {
	type secondary;
	file "example3.bk";
	allow-update-forwarding { 10.53.0.1; };
	primaries {
		10.53.0.1 tls tls-example-primary; // bad
		10.53.0.1; // good
	};
};

zone "noprimary" {
	type secondary;
	file "noprimary1.db";
	allow-update-forwarding { any; };
	masterfile-format text;
	primaries { 10.53.0.4; };
};
