From: Matthijs Mekking Date: Mon, 30 Jan 2023 11:42:33 +0000 (+0100) Subject: Test cds-digest-type configuration X-Git-Tag: v9.19.11~14^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1ec02a3598fba920b485f5d4198141cd732315d;p=thirdparty%2Fbind9.git Test cds-digest-type configuration Add tests for good and bad configuration values in the checkconf system test. --- diff --git a/bin/tests/system/checkconf/bad-kasp-digest-type.conf b/bin/tests/system/checkconf/bad-kasp-digest-type.conf new file mode 100644 index 00000000000..d5a160e2f0e --- /dev/null +++ b/bin/tests/system/checkconf/bad-kasp-digest-type.conf @@ -0,0 +1,22 @@ +/* + * 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. + */ + +dnssec-policy "bad-digesttype" { + cds-digest-type foobar; +}; + +zone "example.net" { + type primary; + file "example.db"; + dnssec-policy "baddigesttype"; +}; diff --git a/bin/tests/system/checkconf/bad-kasp-digest-unsupported.conf b/bin/tests/system/checkconf/bad-kasp-digest-unsupported.conf new file mode 100644 index 00000000000..e263a003197 --- /dev/null +++ b/bin/tests/system/checkconf/bad-kasp-digest-unsupported.conf @@ -0,0 +1,22 @@ +/* + * 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. + */ + +dnssec-policy "bad-digesttype" { + cds-digest-type GOST; +}; + +zone "example.net" { + type primary; + file "example.db"; + dnssec-policy "baddigesttype"; +}; diff --git a/bin/tests/system/checkconf/good-kasp.conf b/bin/tests/system/checkconf/good-kasp.conf index 17309e5ea6e..9e19e26cf5e 100644 --- a/bin/tests/system/checkconf/good-kasp.conf +++ b/bin/tests/system/checkconf/good-kasp.conf @@ -17,6 +17,7 @@ /* cut here */ dnssec-policy "test" { + cds-digest-type "sha-256"; dnskey-ttl 3600; keys { ksk key-directory lifetime P1Y algorithm ecdsa256; diff --git a/bin/tests/system/checkconf/good.conf.in b/bin/tests/system/checkconf/good.conf.in index 9b14aa69c1c..374d111cb81 100644 --- a/bin/tests/system/checkconf/good.conf.in +++ b/bin/tests/system/checkconf/good.conf.in @@ -17,6 +17,7 @@ /* cut here */ dnssec-policy "test" { + cds-digest-type "sha-256"; dnskey-ttl 3600; keys { ksk key-directory lifetime P1Y algorithm 13 256;