From: Ondřej Surý Date: Wed, 12 Feb 2020 11:14:00 +0000 (+0100) Subject: Remove python based tools (dnssec-keymgr, dnssec-coverage, dnssec-checkds) X-Git-Tag: v9.17.2~131^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98b3b93791777218c04a67ddaef22619162249f7;p=thirdparty%2Fbind9.git Remove python based tools (dnssec-keymgr, dnssec-coverage, dnssec-checkds) With the introduction of dnssec-policy, the aforementioned tools were either rendered obsolete, or they will be replaced with dnssec-policy based tools. Remove the tools and the requirement to have Python installed. Python 3 is still being used for tests, so keep the autoconf test, but make it much simpler. --- diff --git a/README b/README index 41c682d14bc..61a4764efe4 100644 --- a/README +++ b/README @@ -181,15 +181,6 @@ This can be downloaded from https://developer.apple.com/download/more/ or, if you have Xcode already installed, you can run xcode-select --install. (Note that an Apple ID may be required to access the download page.) -Dependencies - -Portions of BIND that are written in Python, including dnssec-keymgr, -dnssec-coverage, dnssec-checkds, and some of the system tests, require the -argparse, ply and distutils.core modules to be available. argparse is a -standard module as of Python 2.7 and Python 3.2. ply is available from -https://pypi.python.org/pypi/ply. distutils.core is required for -installation. - Compile-time options To see a full list of configuration options, run configure --help. diff --git a/README.md b/README.md index be07b54ac2d..41b7bb7b570 100644 --- a/README.md +++ b/README.md @@ -195,16 +195,6 @@ or, if you have Xcode already installed, you can run `xcode-select --install`. (Note that an Apple ID may be required to access the download page.) -### Dependencies - -Portions of BIND that are written in Python, including -`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the -system tests, require the `argparse`, `ply` and `distutils.core` modules -to be available. -`argparse` is a standard module as of Python 2.7 and Python 3.2. -`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply). -`distutils.core` is required for installation. - #### Compile-time options To see a full list of configuration options, run `configure --help`. diff --git a/bin/Makefile.in b/bin/Makefile.in index 9ad7f626b80..389557222e7 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -12,7 +12,7 @@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \ - @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests + @NZD_TOOLS@ @PKCS11_TOOLS@ plugins tests TARGETS = @BIND9_MAKE_RULES@ diff --git a/bin/dnssec/dnssec-keygen.docbook b/bin/dnssec/dnssec-keygen.docbook index 3b9c8162241..0768b302b26 100644 --- a/bin/dnssec/dnssec-keygen.docbook +++ b/bin/dnssec/dnssec-keygen.docbook @@ -108,13 +108,6 @@ line. For DNSSEC keys, this must match the name of the zone for which the key is being generated. - - The dnssec-keymgr command acts as a wrapper - around dnssec-keygen, generating and updating keys - as needed to enforce defined security policies such as key rollover - scheduling. Using dnssec-keymgr may be preferable - to direct use of dnssec-keygen. - OPTIONS diff --git a/bin/python/.gitignore b/bin/python/.gitignore deleted file mode 100644 index 010fab03c19..00000000000 --- a/bin/python/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -build -dnssec-checkds -dnssec-checkds.py -dnssec-coverage -dnssec-coverage.py -dnssec-keymgr -dnssec-keymgr.py -*.pyc diff --git a/bin/python/Makefile.in b/bin/python/Makefile.in deleted file mode 100644 index aa678d47abb..00000000000 --- a/bin/python/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ -# 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. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -PYTHON = @PYTHON@ - -SUBDIRS = isc - -TARGETS = dnssec-checkds dnssec-coverage dnssec-keymgr -PYSRCS = dnssec-checkds.py dnssec-coverage.py dnssec-keymgr.py - -MANPAGES = dnssec-checkds.8 dnssec-coverage.8 dnssec-keymgr.8 -HTMLPAGES = dnssec-checkds.html dnssec-coverage.html dnssec-keymgr.html -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -dnssec-checkds: dnssec-checkds.py - cp -f dnssec-checkds.py dnssec-checkds - chmod +x dnssec-checkds - -dnssec-coverage: dnssec-coverage.py - cp -f dnssec-coverage.py dnssec-coverage - chmod +x dnssec-coverage - -dnssec-keymgr: dnssec-keymgr.py - cp -f dnssec-keymgr.py dnssec-keymgr - chmod +x dnssec-keymgr - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: ${TARGETS} installdirs - ${INSTALL_SCRIPT} dnssec-checkds ${DESTDIR}${sbindir} - ${INSTALL_SCRIPT} dnssec-coverage ${DESTDIR}${sbindir} - ${INSTALL_SCRIPT} dnssec-keymgr ${DESTDIR}${sbindir} - ${INSTALL_DATA} ${srcdir}/dnssec-checkds.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/dnssec-coverage.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/dnssec-keymgr.8 ${DESTDIR}${mandir}/man8 - if test -n "${PYTHON}" ; then \ - if test -n "${DESTDIR}" ; then \ - ${PYTHON} ${srcdir}/setup.py install --root=${DESTDIR} --prefix=${prefix} @PYTHON_INSTALL_LIB@ ; \ - else \ - ${PYTHON} ${srcdir}/setup.py install --prefix=${prefix} @PYTHON_INSTALL_LIB@ ; \ - fi ; \ - rm -rf build ; \ - fi - -uninstall:: - rm -f ${DESTDIR}${mandir}/man8/dnssec-keymgr.8 - rm -f ${DESTDIR}${mandir}/man8/dnssec-coverage.8 - rm -f ${DESTDIR}${mandir}/man8/dnssec-checkds.8 - rm -f ${DESTDIR}${sbindir}/dnssec-keymgr - rm -f ${DESTDIR}${sbindir}/dnssec-coverage - rm -f ${DESTDIR}${sbindir}/dnssec-checkds - # only manually uninstall for the python package itself - -clean distclean:: - rm -f ${TARGETS} - rm -rf build - -distclean:: - rm -f dnssec-checkds.py dnssec-coverage.py dnssec-keymgr.py diff --git a/bin/python/dnssec-checkds.8 b/bin/python/dnssec-checkds.8 deleted file mode 100644 index c85cbfc6917..00000000000 --- a/bin/python/dnssec-checkds.8 +++ /dev/null @@ -1,95 +0,0 @@ -.\" Copyright (C) 2012-2020 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/. -.\" -.hy 0 -.ad l -'\" t -.\" Title: dnssec-checkds -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 2013-01-01 -.\" Manual: BIND9 -.\" Source: ISC -.\" Language: English -.\" -.TH "DNSSEC\-CHECKDS" "8" "2013\-01\-01" "ISC" "BIND9" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dnssec-checkds \- DNSSEC delegation consistency checking tool -.SH "SYNOPSIS" -.HP \w'\fBdnssec\-checkds\fR\ 'u -\fBdnssec\-checkds\fR [\fB\-d\ \fR\fB\fIdig\ path\fR\fR] [\fB\-D\ \fR\fB\fIdsfromkey\ path\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-s\ \fR\fB\fIfile\fR\fR] {zone} -.SH "DESCRIPTION" -.PP -\fBdnssec\-checkds\fR -verifies the correctness of Delegation Signer (DS) resource records for keys in a specified zone\&. -.SH "OPTIONS" -.PP -\-a \fIalgorithm\fR -.RS 4 -Specify a digest algorithm to use when converting the zone\*(Aqs DNSKEY records to expected DS records\&. This option can be repeated, so that multiple records are checked for each DNSKEY record\&. -.sp -The -\fIalgorithm\fR -must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&. -.RE -.PP -\-f \fIfile\fR -.RS 4 -If a -\fBfile\fR -is specified, then the zone is read from that file to find the DNSKEY records\&. If not, then the DNSKEY records for the zone are looked up in the DNS\&. -.RE -.PP -\-s \fIfile\fR -.RS 4 -Specifies a prepared dsset file, such as would be generated by -\fBdnssec\-signzone\fR, to use as a source for the DS RRset instead of querying the parent\&. -.RE -.PP -\-d \fIdig path\fR -.RS 4 -Specifies a path to a -\fBdig\fR -binary\&. Used for testing\&. -.RE -.PP -\-D \fIdsfromkey path\fR -.RS 4 -Specifies a path to a -\fBdnssec\-dsfromkey\fR -binary\&. Used for testing\&. -.RE -.SH "SEE ALSO" -.PP -\fBdnssec-dsfromkey\fR(8), -\fBdnssec-keygen\fR(8), -\fBdnssec-signzone\fR(8), -.SH "AUTHOR" -.PP -\fBInternet Systems Consortium, Inc\&.\fR -.SH "COPYRIGHT" -.br -Copyright \(co 2012-2020 Internet Systems Consortium, Inc. ("ISC") -.br diff --git a/bin/python/dnssec-checkds.docbook b/bin/python/dnssec-checkds.docbook deleted file mode 100644 index 3a86682b00e..00000000000 --- a/bin/python/dnssec-checkds.docbook +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - 2013-01-01 - - - ISC - Internet Systems Consortium, Inc. - - - - dnssec-checkds - 8 - BIND9 - - - - dnssec-checkds - DNSSEC delegation consistency checking tool - - - - - 2012 - 2013 - 2014 - 2015 - 2016 - 2017 - 2018 - 2019 - 2020 - Internet Systems Consortium, Inc. ("ISC") - - - - - - dnssec-checkds - - - - - - zone - - - - DESCRIPTION - - dnssec-checkds - verifies the correctness of Delegation Signer (DS) - resource records for keys in a specified zone. - - - - OPTIONS - - - - - -a algorithm - - - Specify a digest algorithm to use when converting the - zone's DNSKEY records to expected DS records. This - option can be repeated, so that multiple records are - checked for each DNSKEY record. - - - The algorithm must be one of - SHA-1, SHA-256, or SHA-384. These values are case insensitive, - and the hyphen may be omitted. If no algorithm is specified, - the default is SHA-256. - - - - - - -f file - - - If a is specified, then the zone is - read from that file to find the DNSKEY records. If not, - then the DNSKEY records for the zone are looked up in the DNS. - - - - - - -s file - - - Specifies a prepared dsset file, such as would be generated - by dnssec-signzone, to use as a source for - the DS RRset instead of querying the parent. - - - - - - -d dig path - - - Specifies a path to a dig binary. Used - for testing. - - - - - - -D dsfromkey path - - - Specifies a path to a dnssec-dsfromkey binary. - Used for testing. - - - - - - - SEE ALSO - - - dnssec-dsfromkey8 - , - - dnssec-keygen8 - , - - dnssec-signzone8 - , - - - - diff --git a/bin/python/dnssec-checkds.html b/bin/python/dnssec-checkds.html deleted file mode 100644 index 9e23bdcdc69..00000000000 --- a/bin/python/dnssec-checkds.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - -dnssec-checkds - - -
-
- - - - - -
-

Name

-

- dnssec-checkds - — DNSSEC delegation consistency checking tool -

-
- - - -
-

Synopsis

-

- dnssec-checkds - [-d dig path] - [-D dsfromkey path] - [-f file] - [-l domain] - [-s file] - {zone} -

-
- -
-

DESCRIPTION

- -

dnssec-checkds - verifies the correctness of Delegation Signer (DS) - resource records for keys in a specified zone. -

-
- -
-

OPTIONS

- -
-
-a algorithm
-
-

- Specify a digest algorithm to use when converting the - zone's DNSKEY records to expected DS records. This - option can be repeated, so that multiple records are - checked for each DNSKEY record. -

-

- The algorithm must be one of - SHA-1, SHA-256, or SHA-384. These values are case insensitive, - and the hyphen may be omitted. If no algorithm is specified, - the default is SHA-256. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file to find the DNSKEY records. If not, - then the DNSKEY records for the zone are looked up in the DNS. -

-
-
-s file
-
-

- Specifies a prepared dsset file, such as would be generated - by dnssec-signzone, to use as a source for - the DS RRset instead of querying the parent. -

-
-
-d dig path
-
-

- Specifies a path to a dig binary. Used - for testing. -

-
-
-D dsfromkey path
-
-

- Specifies a path to a dnssec-dsfromkey binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - , -

-
- -
- diff --git a/bin/python/dnssec-checkds.py.in b/bin/python/dnssec-checkds.py.in deleted file mode 100644 index ed5ac374889..00000000000 --- a/bin/python/dnssec-checkds.py.in +++ /dev/null @@ -1,27 +0,0 @@ -#!@PYTHON@ -############################################################################ -# 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. -############################################################################ - -import os -import sys - -sys.path.insert(0, os.path.dirname(sys.argv[0])) -if os.name != 'nt': - if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir - sys.path.insert(1, '@PYTHON_INSTALL_DIR@') - else: - sys.path.insert(1, os.path.join('@prefix@', 'lib', - 'python' + sys.version[:3], 'site-packages')) - -import isc.checkds - -if __name__ == "__main__": - isc.checkds.main() diff --git a/bin/python/dnssec-coverage.8 b/bin/python/dnssec-coverage.8 deleted file mode 100644 index 295a1e5edf4..00000000000 --- a/bin/python/dnssec-coverage.8 +++ /dev/null @@ -1,156 +0,0 @@ -.\" Copyright (C) 2013-2016, 2018-2020 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/. -.\" -.hy 0 -.ad l -'\" t -.\" Title: dnssec-coverage -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 2014-01-11 -.\" Manual: BIND9 -.\" Source: ISC -.\" Language: English -.\" -.TH "DNSSEC\-COVERAGE" "8" "2014\-01\-11" "ISC" "BIND9" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dnssec-coverage \- checks future DNSKEY coverage for a zone -.SH "SYNOPSIS" -.HP \w'\fBdnssec\-coverage\fR\ 'u -\fBdnssec\-coverage\fR [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-l\ \fR\fB\fIlength\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-d\ \fR\fB\fIDNSKEY\ TTL\fR\fR] [\fB\-m\ \fR\fB\fImax\ TTL\fR\fR] [\fB\-r\ \fR\fB\fIinterval\fR\fR] [\fB\-c\ \fR\fB\fIcompilezone\ path\fR\fR] [\fB\-k\fR] [\fB\-z\fR] [zone...] -.SH "DESCRIPTION" -.PP -\fBdnssec\-coverage\fR -verifies that the DNSSEC keys for a given zone or a set of zones have timing metadata set properly to ensure no future lapses in DNSSEC coverage\&. -.PP -If -\fBzone\fR -is specified, then keys found in the key repository matching that zone are scanned, and an ordered list is generated of the events scheduled for that key (i\&.e\&., publication, activation, inactivation, deletion)\&. The list of events is walked in order of occurrence\&. Warnings are generated if any event is scheduled which could cause the zone to enter a state in which validation failures might occur: for example, if the number of published or active keys for a given algorithm drops to zero, or if a key is deleted from the zone too soon after a new key is rolled, and cached data signed by the prior key has not had time to expire from resolver caches\&. -.PP -If -\fBzone\fR -is not specified, then all keys in the key repository will be scanned, and all zones for which there are keys will be analyzed\&. (Note: This method of reporting is only accurate if all the zones that have keys in a given repository share the same TTL parameters\&.) -.SH "OPTIONS" -.PP -\-K \fIdirectory\fR -.RS 4 -Sets the directory in which keys can be found\&. Defaults to the current working directory\&. -.RE -.PP -\-f \fIfile\fR -.RS 4 -If a -\fBfile\fR -is specified, then the zone is read from that file; the largest TTL and the DNSKEY TTL are determined directly from the zone data, and the -\fB\-m\fR -and -\fB\-d\fR -options do not need to be specified on the command line\&. -.RE -.PP -\-l \fIduration\fR -.RS 4 -The length of time to check for DNSSEC coverage\&. Key events scheduled further into the future than -\fBduration\fR -will be ignored, and assumed to be correct\&. -.sp -The value of -\fBduration\fR -can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.RE -.PP -\-m \fImaximum TTL\fR -.RS 4 -Sets the value to be used as the maximum TTL for the zone or zones being analyzed when determining whether there is a possibility of validation failure\&. When a zone\-signing key is deactivated, there must be enough time for the record in the zone with the longest TTL to have expired from resolver caches before that key can be purged from the DNSKEY RRset\&. If that condition does not apply, a warning will be generated\&. -.sp -The length of the TTL can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.sp -This option is not necessary if the -\fB\-f\fR -has been used to specify a zone file\&. If -\fB\-f\fR -has been specified, this option may still be used; it will override the value found in the file\&. -.sp -If this option is not used and the maximum TTL cannot be retrieved from a zone file, a warning is generated and a default value of 1 week is used\&. -.RE -.PP -\-d \fIDNSKEY TTL\fR -.RS 4 -Sets the value to be used as the DNSKEY TTL for the zone or zones being analyzed when determining whether there is a possibility of validation failure\&. When a key is rolled (that is, replaced with a new key), there must be enough time for the old DNSKEY RRset to have expired from resolver caches before the new key is activated and begins generating signatures\&. If that condition does not apply, a warning will be generated\&. -.sp -The length of the TTL can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.sp -This option is not necessary if -\fB\-f\fR -has been used to specify a zone file from which the TTL of the DNSKEY RRset can be read, or if a default key TTL was set using ith the -\fB\-L\fR -to -\fBdnssec\-keygen\fR\&. If either of those is true, this option may still be used; it will override the values found in the zone file or the key file\&. -.sp -If this option is not used and the key TTL cannot be retrieved from the zone file or the key file, then a warning is generated and a default value of 1 day is used\&. -.RE -.PP -\-r \fIresign interval\fR -.RS 4 -Sets the value to be used as the resign interval for the zone or zones being analyzed when determining whether there is a possibility of validation failure\&. This value defaults to 22\&.5 days, which is also the default in -\fBnamed\fR\&. However, if it has been changed by the -\fBsig\-validity\-interval\fR -option in -named\&.conf, then it should also be changed here\&. -.sp -The length of the interval can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.RE -.PP -\-k -.RS 4 -Only check KSK coverage; ignore ZSK events\&. Cannot be used with -\fB\-z\fR\&. -.RE -.PP -\-z -.RS 4 -Only check ZSK coverage; ignore KSK events\&. Cannot be used with -\fB\-k\fR\&. -.RE -.PP -\-c \fIcompilezone path\fR -.RS 4 -Specifies a path to a -\fBnamed\-compilezone\fR -binary\&. Used for testing\&. -.RE -.SH "SEE ALSO" -.PP -\fBdnssec-checkds\fR(8), -\fBdnssec-dsfromkey\fR(8), -\fBdnssec-keygen\fR(8), -\fBdnssec-signzone\fR(8) -.SH "AUTHOR" -.PP -\fBInternet Systems Consortium, Inc\&.\fR -.SH "COPYRIGHT" -.br -Copyright \(co 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") -.br diff --git a/bin/python/dnssec-coverage.docbook b/bin/python/dnssec-coverage.docbook deleted file mode 100644 index cbbf773ff65..00000000000 --- a/bin/python/dnssec-coverage.docbook +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - 2014-01-11 - - - ISC - Internet Systems Consortium, Inc. - - - - dnssec-coverage - 8 - BIND9 - - - - dnssec-coverage - checks future DNSKEY coverage for a zone - - - - - 2013 - 2014 - 2015 - 2016 - 2018 - 2019 - 2020 - Internet Systems Consortium, Inc. ("ISC") - - - - - - dnssec-coverage - - - - - - - - - - zone - - - - DESCRIPTION - - dnssec-coverage - verifies that the DNSSEC keys for a given zone or a set of zones - have timing metadata set properly to ensure no future lapses in DNSSEC - coverage. - - - If is specified, then keys found in - the key repository matching that zone are scanned, and an ordered - list is generated of the events scheduled for that key (i.e., - publication, activation, inactivation, deletion). The list of - events is walked in order of occurrence. Warnings are generated - if any event is scheduled which could cause the zone to enter a - state in which validation failures might occur: for example, if - the number of published or active keys for a given algorithm drops - to zero, or if a key is deleted from the zone too soon after a new - key is rolled, and cached data signed by the prior key has not had - time to expire from resolver caches. - - - If is not specified, then all keys in the - key repository will be scanned, and all zones for which there are - keys will be analyzed. (Note: This method of reporting is only - accurate if all the zones that have keys in a given repository - share the same TTL parameters.) - - - - OPTIONS - - - - - -K directory - - - Sets the directory in which keys can be found. Defaults to the - current working directory. - - - - - - -f file - - - If a is specified, then the zone is - read from that file; the largest TTL and the DNSKEY TTL are - determined directly from the zone data, and the - and options do - not need to be specified on the command line. - - - - - - -l duration - - - The length of time to check for DNSSEC coverage. Key events - scheduled further into the future than - will be ignored, and assumed to be correct. - - - The value of can be set in seconds, - or in larger units of time by adding a suffix: 'mi' for minutes, - 'h' for hours, 'd' for days, 'w' for weeks, 'mo' for months, - 'y' for years. - - - - - - -m maximum TTL - - - Sets the value to be used as the maximum TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a zone-signing key is - deactivated, there must be enough time for the record in the - zone with the longest TTL to have expired from resolver caches - before that key can be purged from the DNSKEY RRset. If that - condition does not apply, a warning will be generated. - - - The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. - - - This option is not necessary if the has - been used to specify a zone file. If has - been specified, this option may still be used; it will override - the value found in the file. - - - If this option is not used and the maximum TTL cannot be retrieved - from a zone file, a warning is generated and a default value of - 1 week is used. - - - - - - -d DNSKEY TTL - - - Sets the value to be used as the DNSKEY TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a key is rolled (that - is, replaced with a new key), there must be enough time for the - old DNSKEY RRset to have expired from resolver caches before - the new key is activated and begins generating signatures. If - that condition does not apply, a warning will be generated. - - - The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. - - - This option is not necessary if has - been used to specify a zone file from which the TTL - of the DNSKEY RRset can be read, or if a default key TTL was - set using ith the to - dnssec-keygen. If either of those is true, - this option may still be used; it will override the values - found in the zone file or the key file. - - - If this option is not used and the key TTL cannot be retrieved - from the zone file or the key file, then a warning is generated - and a default value of 1 day is used. - - - - - - -r resign interval - - - Sets the value to be used as the resign interval for the zone - or zones being analyzed when determining whether there is a - possibility of validation failure. This value defaults to - 22.5 days, which is also the default in - named. However, if it has been changed - by the option in - named.conf, then it should also be - changed here. - - - The length of the interval can be set in seconds, or in larger - units of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. - - - - - - -k - - - Only check KSK coverage; ignore ZSK events. Cannot be - used with . - - - - - - -z - - - Only check ZSK coverage; ignore KSK events. Cannot be - used with . - - - - - - - -c compilezone path - - - Specifies a path to a named-compilezone binary. - Used for testing. - - - - - - - SEE ALSO - - - - dnssec-checkds8 - , - - dnssec-dsfromkey8 - , - - dnssec-keygen8 - , - - dnssec-signzone8 - - - - - diff --git a/bin/python/dnssec-coverage.html b/bin/python/dnssec-coverage.html deleted file mode 100644 index 83b881a2482..00000000000 --- a/bin/python/dnssec-coverage.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - -dnssec-coverage - - -
-
- - - - - -
-

Name

-

- dnssec-coverage - — checks future DNSKEY coverage for a zone -

-
- - - -
-

Synopsis

-

- dnssec-coverage - [-K directory] - [-l length] - [-f file] - [-d DNSKEY TTL] - [-m max TTL] - [-r interval] - [-c compilezone path] - [-k] - [-z] - [zone...] -

-
- -
-

DESCRIPTION

- -

dnssec-coverage - verifies that the DNSSEC keys for a given zone or a set of zones - have timing metadata set properly to ensure no future lapses in DNSSEC - coverage. -

-

- If zone is specified, then keys found in - the key repository matching that zone are scanned, and an ordered - list is generated of the events scheduled for that key (i.e., - publication, activation, inactivation, deletion). The list of - events is walked in order of occurrence. Warnings are generated - if any event is scheduled which could cause the zone to enter a - state in which validation failures might occur: for example, if - the number of published or active keys for a given algorithm drops - to zero, or if a key is deleted from the zone too soon after a new - key is rolled, and cached data signed by the prior key has not had - time to expire from resolver caches. -

-

- If zone is not specified, then all keys in the - key repository will be scanned, and all zones for which there are - keys will be analyzed. (Note: This method of reporting is only - accurate if all the zones that have keys in a given repository - share the same TTL parameters.) -

-
- -
-

OPTIONS

- - -
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file; the largest TTL and the DNSKEY TTL are - determined directly from the zone data, and the - -m and -d options do - not need to be specified on the command line. -

-
-
-l duration
-
-

- The length of time to check for DNSSEC coverage. Key events - scheduled further into the future than duration - will be ignored, and assumed to be correct. -

-

- The value of duration can be set in seconds, - or in larger units of time by adding a suffix: 'mi' for minutes, - 'h' for hours, 'd' for days, 'w' for weeks, 'mo' for months, - 'y' for years. -

-
-
-m maximum TTL
-
-

- Sets the value to be used as the maximum TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a zone-signing key is - deactivated, there must be enough time for the record in the - zone with the longest TTL to have expired from resolver caches - before that key can be purged from the DNSKEY RRset. If that - condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if the -f has - been used to specify a zone file. If -f has - been specified, this option may still be used; it will override - the value found in the file. -

-

- If this option is not used and the maximum TTL cannot be retrieved - from a zone file, a warning is generated and a default value of - 1 week is used. -

-
-
-d DNSKEY TTL
-
-

- Sets the value to be used as the DNSKEY TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a key is rolled (that - is, replaced with a new key), there must be enough time for the - old DNSKEY RRset to have expired from resolver caches before - the new key is activated and begins generating signatures. If - that condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if -f has - been used to specify a zone file from which the TTL - of the DNSKEY RRset can be read, or if a default key TTL was - set using ith the -L to - dnssec-keygen. If either of those is true, - this option may still be used; it will override the values - found in the zone file or the key file. -

-

- If this option is not used and the key TTL cannot be retrieved - from the zone file or the key file, then a warning is generated - and a default value of 1 day is used. -

-
-
-r resign interval
-
-

- Sets the value to be used as the resign interval for the zone - or zones being analyzed when determining whether there is a - possibility of validation failure. This value defaults to - 22.5 days, which is also the default in - named. However, if it has been changed - by the sig-validity-interval option in - named.conf, then it should also be - changed here. -

-

- The length of the interval can be set in seconds, or in larger - units of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-
-
-k
-
-

- Only check KSK coverage; ignore ZSK events. Cannot be - used with -z. -

-
-
-z
-
-

- Only check ZSK coverage; ignore KSK events. Cannot be - used with -k. -

-
-
-c compilezone path
-
-

- Specifies a path to a named-compilezone binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- - dnssec-checkds(8) - , - - dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - -

-
- -
- diff --git a/bin/python/dnssec-coverage.py.in b/bin/python/dnssec-coverage.py.in deleted file mode 100644 index 8518dc3b668..00000000000 --- a/bin/python/dnssec-coverage.py.in +++ /dev/null @@ -1,27 +0,0 @@ -#!@PYTHON@ -############################################################################ -# 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. -############################################################################ - -import os -import sys - -sys.path.insert(0, os.path.dirname(sys.argv[0])) -if os.name != 'nt': - if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir - sys.path.insert(1, '@PYTHON_INSTALL_DIR@') - else: - sys.path.insert(1, os.path.join('@prefix@', 'lib', - 'python' + sys.version[:3], 'site-packages')) - -import isc.coverage - -if __name__ == "__main__": - isc.coverage.main() diff --git a/bin/python/dnssec-keymgr.8 b/bin/python/dnssec-keymgr.8 deleted file mode 100644 index e51b7d8b315..00000000000 --- a/bin/python/dnssec-keymgr.8 +++ /dev/null @@ -1,298 +0,0 @@ -.\" Copyright (C) 2016-2020 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/. -.\" -.hy 0 -.ad l -'\" t -.\" Title: dnssec-keymgr -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 2016-06-03 -.\" Manual: BIND9 -.\" Source: ISC -.\" Language: English -.\" -.TH "DNSSEC\-KEYMGR" "8" "2016\-06\-03" "ISC" "BIND9" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dnssec-keymgr \- Ensures correct DNSKEY coverage for a zone based on a defined policy -.SH "SYNOPSIS" -.HP \w'\fBdnssec\-keymgr\fR\ 'u -\fBdnssec\-keymgr\fR [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-c\ \fR\fB\fIfile\fR\fR] [\fB\-f\fR] [\fB\-k\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-z\fR] [\fB\-g\ \fR\fB\fIpath\fR\fR] [\fB\-s\ \fR\fB\fIpath\fR\fR] [zone...] -.SH "DESCRIPTION" -.PP -\fBdnssec\-keymgr\fR -is a high level Python wrapper to facilitate the key rollover process for zones handled by BIND\&. It uses the BIND commands for manipulating DNSSEC key metadata: -\fBdnssec\-keygen\fR -and -\fBdnssec\-settime\fR\&. -.PP -DNSSEC policy can be read from a configuration file (default -/etc/dnssec\-policy\&.conf), from which the key parameters, publication and rollover schedule, and desired coverage duration for any given zone can be determined\&. This file may be used to define individual DNSSEC policies on a per\-zone basis, or to set a "default" policy used for all zones\&. -.PP -When -\fBdnssec\-keymgr\fR -runs, it examines the DNSSEC keys for one or more zones, comparing their timing metadata against the policies for those zones\&. If key settings do not conform to the DNSSEC policy (for example, because the policy has been changed), they are automatically corrected\&. -.PP -A zone policy can specify a duration for which we want to ensure the key correctness (\fBcoverage\fR)\&. It can also specify a rollover period (\fBroll\-period\fR)\&. If policy indicates that a key should roll over before the coverage period ends, then a successor key will automatically be created and added to the end of the key series\&. -.PP -If zones are specified on the command line, -\fBdnssec\-keymgr\fR -will examine only those zones\&. If a specified zone does not already have keys in place, then keys will be generated for it according to policy\&. -.PP -If zones are -\fInot\fR -specified on the command line, then -\fBdnssec\-keymgr\fR -will search the key directory (either the current working directory or the directory set by the -\fB\-K\fR -option), and check the keys for all the zones represented in the directory\&. -.PP -Key times that are in the past will not be updated unless the -\fB\-f\fR -is used (see below)\&. Key inactivation and deletion times that are less than five minutes in the future will be delayed by five minutes\&. -.PP -It is expected that this tool will be run automatically and unattended (for example, by -\fBcron\fR)\&. -.SH "OPTIONS" -.PP -\-c \fIfile\fR -.RS 4 -If -\fB\-c\fR -is specified, then the DNSSEC policy is read from -\fBfile\fR\&. (If not specified, then the policy is read from -/etc/dnssec\-policy\&.conf; if that file doesn\*(Aqt exist, a built\-in global default policy is used\&.) -.RE -.PP -\-f -.RS 4 -Force: allow updating of key events even if they are already in the past\&. This is not recommended for use with zones in which keys have already been published\&. However, if a set of keys has been generated all of which have publication and activation dates in the past, but the keys have not been published in a zone as yet, then this option can be used to clean them up and turn them into a proper series of keys with appropriate rollover intervals\&. -.RE -.PP -\-g \fIkeygen\-path\fR -.RS 4 -Specifies a path to a -\fBdnssec\-keygen\fR -binary\&. Used for testing\&. See also the -\fB\-s\fR -option\&. -.RE -.PP -\-h -.RS 4 -Print the -\fBdnssec\-keymgr\fR -help summary and exit\&. -.RE -.PP -\-K \fIdirectory\fR -.RS 4 -Sets the directory in which keys can be found\&. Defaults to the current working directory\&. -.RE -.PP -\-k -.RS 4 -Only apply policies to KSK keys\&. See also the -\fB\-z\fR -option\&. -.RE -.PP -\-q -.RS 4 -Quiet: suppress printing of -\fBdnssec\-keygen\fR -and -\fBdnssec\-settime\fR\&. -.RE -.PP -\-s \fIsettime\-path\fR -.RS 4 -Specifies a path to a -\fBdnssec\-settime\fR -binary\&. Used for testing\&. See also the -\fB\-g\fR -option\&. -.RE -.PP -\-v -.RS 4 -Print the -\fBdnssec\-keymgr\fR -version and exit\&. -.RE -.PP -\-z -.RS 4 -Only apply policies to ZSK keys\&. See also the -\fB\-k\fR -option\&. -.RE -.SH "POLICY CONFIGURATION" -.PP -The -dnssec\-policy\&.conf -file can specify three kinds of policies: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIPolicy classes\fR -(\fBpolicy \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR) can be inherited by zone policies or other policy classes; these can be used to create sets of different security profiles\&. For example, a policy class -\fBnormal\fR -might specify 1024\-bit key sizes, but a class -\fBextra\fR -might specify 2048 bits instead; -\fBextra\fR -would be used for zones that had unusually high security needs\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIAlgorithm policies:\fR -(\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&. };\fR -) override default per\-algorithm settings\&. For example, by default, RSASHA256 keys use 2048\-bit key sizes for both KSK and ZSK\&. This can be modified using -\fBalgorithm\-policy\fR, and the new key sizes would then be used for any key of type RSASHA256\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIZone policies:\fR -(\fBzone \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR -) set policy for a single zone by name\&. A zone policy can inherit a policy class by including a -\fBpolicy\fR -option\&. Zone names beginning with digits (i\&.e\&., 0\-9) must be quoted\&. If a zone does not have its own policy then the "default" policy applies\&. -.RE -.PP -Options that can be specified in policies: -.PP -\fBalgorithm\fR \fIname\fR; -.RS 4 -The key algorithm\&. If no policy is defined, the default is RSASHA256\&. -.RE -.PP -\fBcoverage\fR \fIduration\fR; -.RS 4 -The length of time to ensure that keys will be correct; no action will be taken to create new keys to be activated after this time\&. This can be represented as a number of seconds, or as a duration using human\-readable units (examples: "1y" or "6 months")\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is six months\&. -.RE -.PP -\fBdirectory\fR \fIpath\fR; -.RS 4 -Specifies the directory in which keys should be stored\&. -.RE -.PP -\fBkey\-size\fR \fIkeytype\fR \fIsize\fR; -.RS 4 -Specifies the number of bits to use in creating keys\&. The keytype is either "zsk" or "ksk"\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&. -.RE -.PP -\fBkeyttl\fR \fIduration\fR; -.RS 4 -The key TTL\&. If no policy is defined, the default is one hour\&. -.RE -.PP -\fBpost\-publish\fR \fIkeytype\fR \fIduration\fR; -.RS 4 -How long after inactivation a key should be deleted from the zone\&. Note: If -\fBroll\-period\fR -is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&. -.RE -.PP -\fBpre\-publish\fR \fIkeytype\fR \fIduration\fR; -.RS 4 -How long before activation a key should be published\&. Note: If -\fBroll\-period\fR -is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&. -.RE -.PP -\fBroll\-period\fR \fIkeytype\fR \fIduration\fR; -.RS 4 -How frequently keys should be rolled over\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is one year for ZSKs\&. KSKs do not roll over by default\&. -.RE -.PP -\fBstandby\fR \fIkeytype\fR \fInumber\fR; -.RS 4 -Not yet implemented\&. -.RE -.SH "REMAINING WORK" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Enable scheduling of KSK rollovers using the -\fB\-P sync\fR -and -\fB\-D sync\fR -options to -\fBdnssec\-keygen\fR -and -\fBdnssec\-settime\fR\&. Check the parent zone (as in -\fBdnssec\-checkds\fR) to determine when it\*(Aqs safe for the key to roll\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Allow configuration of standby keys and use of the REVOKE bit, for keys that use RFC 5011 semantics\&. -.RE -.SH "SEE ALSO" -.PP -\fBdnssec-coverage\fR(8), -\fBdnssec-keygen\fR(8), -\fBdnssec-settime\fR(8), -\fBdnssec-checkds\fR(8) -.SH "AUTHOR" -.PP -\fBInternet Systems Consortium, Inc\&.\fR -.SH "COPYRIGHT" -.br -Copyright \(co 2016-2020 Internet Systems Consortium, Inc. ("ISC") -.br diff --git a/bin/python/dnssec-keymgr.docbook b/bin/python/dnssec-keymgr.docbook deleted file mode 100644 index dd29a9a046b..00000000000 --- a/bin/python/dnssec-keymgr.docbook +++ /dev/null @@ -1,422 +0,0 @@ - - - - - 2016-06-03 - - - ISC - Internet Systems Consortium, Inc. - - - - dnssec-keymgr - 8 - BIND9 - - - - dnssec-keymgr - Ensures correct DNSKEY coverage for a zone based on a defined policy - - - - - 2016 - 2017 - 2018 - 2019 - 2020 - Internet Systems Consortium, Inc. ("ISC") - - - - - - dnssec-keymgr - - - - - - - - - - zone - - - - DESCRIPTION - - dnssec-keymgr is a high level Python wrapper - to facilitate the key rollover process for zones handled by - BIND. It uses the BIND commands for manipulating DNSSEC key - metadata: dnssec-keygen and - dnssec-settime. - - - DNSSEC policy can be read from a configuration file (default - /etc/dnssec-policy.conf), from which the - key parameters, publication and rollover schedule, and desired - coverage duration for any given zone can be determined. This - file may be used to define individual DNSSEC policies on a - per-zone basis, or to set a "default" policy - used for all zones. - - - When dnssec-keymgr runs, it examines the DNSSEC - keys for one or more zones, comparing their timing metadata against - the policies for those zones. If key settings do not conform to the - DNSSEC policy (for example, because the policy has been changed), - they are automatically corrected. - - - A zone policy can specify a duration for which we want to - ensure the key correctness (). It can - also specify a rollover period (). - If policy indicates that a key should roll over before the - coverage period ends, then a successor key will automatically be - created and added to the end of the key series. - - - If zones are specified on the command line, - dnssec-keymgr will examine only those zones. - If a specified zone does not already have keys in place, then - keys will be generated for it according to policy. - - - If zones are not specified on the command - line, then dnssec-keymgr will search the - key directory (either the current working directory or the directory - set by the option), and check the keys for - all the zones represented in the directory. - - - Key times that are in the past will not be updated unless - the is used (see below). Key inactivation - and deletion times that are less than five minutes in the future - will be delayed by five minutes. - - - It is expected that this tool will be run automatically and - unattended (for example, by cron). - - - - OPTIONS - - - -c file - - - If is specified, then the DNSSEC - policy is read from . (If not - specified, then the policy is read from - /etc/dnssec-policy.conf; if that file - doesn't exist, a built-in global default policy is used.) - - - - - - -f - - - Force: allow updating of key events even if they are - already in the past. This is not recommended for use with - zones in which keys have already been published. However, - if a set of keys has been generated all of which have - publication and activation dates in the past, but the - keys have not been published in a zone as yet, then this - option can be used to clean them up and turn them into a - proper series of keys with appropriate rollover intervals. - - - - - - -g keygen-path - - - Specifies a path to a dnssec-keygen binary. - Used for testing. - See also the option. - - - - - - -h - - - Print the dnssec-keymgr help summary - and exit. - - - - - - -K directory - - - Sets the directory in which keys can be found. Defaults to the - current working directory. - - - - - - -k - - - Only apply policies to KSK keys. - See also the option. - - - - - - -q - - - Quiet: suppress printing of dnssec-keygen - and dnssec-settime. - - - - - - -s settime-path - - - Specifies a path to a dnssec-settime binary. - Used for testing. - See also the option. - - - - - - -v - - - Print the dnssec-keymgr version and exit. - - - - - - -z - - - Only apply policies to ZSK keys. - See also the option. - - - - - - - POLICY CONFIGURATION - - The dnssec-policy.conf file can specify three kinds - of policies: - - - - - Policy classes - () - can be inherited by zone policies or other policy classes; these - can be used to create sets of different security profiles. For - example, a policy class normal might specify - 1024-bit key sizes, but a class extra might - specify 2048 bits instead; extra would be - used for zones that had unusually high security needs. - - - - - Algorithm policies: - ( ) - override default per-algorithm settings. For example, by default, - RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This - can be modified using algorithm-policy, and the - new key sizes would then be used for any key of type RSASHA256. - - - - - Zone policies: - ( ) - set policy for a single zone by name. A zone policy can inherit - a policy class by including a option. - Zone names beginning with digits (i.e., 0-9) must be quoted. - If a zone does not have its own policy then the - "default" policy applies. - - - - - Options that can be specified in policies: - - - - algorithm - name; - - - The key algorithm. If no policy is defined, the default is - RSASHA256. - - - - - coverage - duration; - - - The length of time to ensure that keys will be correct; no action - will be taken to create new keys to be activated after this time. - This can be represented as a number of seconds, or as a duration - using human-readable units (examples: "1y" or "6 months"). - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. - If no policy is configured, the default is six months. - - - - - directory - path; - - - Specifies the directory in which keys should be stored. - - - - - key-size keytype - size; - - - Specifies the number of bits to use in creating keys. - The keytype is either "zsk" or "ksk". - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is 2048 bits for RSA keys. - - - - - keyttl - duration; - - - The key TTL. If no policy is defined, the default is one hour. - - - - - post-publish keytype - duration; - - - How long after inactivation a key should be deleted from the zone. - Note: If is not set, this value is - ignored. The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm - policies as well as in policy classes or zone policies. The default - is one month. - - - - - pre-publish keytype - duration; - - - How long before activation a key should be published. Note: If - is not set, this value is ignored. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. The default is - one month. - - - - - roll-period keytype - duration; - - - How frequently keys should be rolled over. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is one year for ZSKs. KSKs do not - roll over by default. - - - - - standby keytype - number; - - - Not yet implemented. - - - - - - - REMAINING WORK - - - - Enable scheduling of KSK rollovers using the - and options to - dnssec-keygen and - dnssec-settime. Check the parent zone - (as in dnssec-checkds) to determine when it's - safe for the key to roll. - - - - - Allow configuration of standby keys and use of the REVOKE bit, - for keys that use RFC 5011 semantics. - - - - - - SEE ALSO - - - dnssec-coverage8 - , - - dnssec-keygen8 - , - - dnssec-settime8 - , - - dnssec-checkds8 - - - - - diff --git a/bin/python/dnssec-keymgr.html b/bin/python/dnssec-keymgr.html deleted file mode 100644 index 6fe08765017..00000000000 --- a/bin/python/dnssec-keymgr.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - -dnssec-keymgr - - -
-
- - - - - -
-

Name

-

- dnssec-keymgr - — Ensures correct DNSKEY coverage for a zone based on a defined policy -

-
- - - -
-

Synopsis

-

- dnssec-keymgr - [-K directory] - [-c file] - [-f] - [-k] - [-q] - [-v] - [-z] - [-g path] - [-s path] - [zone...] -

-
- -
-

DESCRIPTION

-

- dnssec-keymgr is a high level Python wrapper - to facilitate the key rollover process for zones handled by - BIND. It uses the BIND commands for manipulating DNSSEC key - metadata: dnssec-keygen and - dnssec-settime. -

-

- DNSSEC policy can be read from a configuration file (default - /etc/dnssec-policy.conf), from which the - key parameters, publication and rollover schedule, and desired - coverage duration for any given zone can be determined. This - file may be used to define individual DNSSEC policies on a - per-zone basis, or to set a "default" policy - used for all zones. -

-

- When dnssec-keymgr runs, it examines the DNSSEC - keys for one or more zones, comparing their timing metadata against - the policies for those zones. If key settings do not conform to the - DNSSEC policy (for example, because the policy has been changed), - they are automatically corrected. -

-

- A zone policy can specify a duration for which we want to - ensure the key correctness (coverage). It can - also specify a rollover period (roll-period). - If policy indicates that a key should roll over before the - coverage period ends, then a successor key will automatically be - created and added to the end of the key series. -

-

- If zones are specified on the command line, - dnssec-keymgr will examine only those zones. - If a specified zone does not already have keys in place, then - keys will be generated for it according to policy. -

-

- If zones are not specified on the command - line, then dnssec-keymgr will search the - key directory (either the current working directory or the directory - set by the -K option), and check the keys for - all the zones represented in the directory. -

-

- Key times that are in the past will not be updated unless - the -f is used (see below). Key inactivation - and deletion times that are less than five minutes in the future - will be delayed by five minutes. -

-

- It is expected that this tool will be run automatically and - unattended (for example, by cron). -

-
- -
-

OPTIONS

-
-
-c file
-
-

- If -c is specified, then the DNSSEC - policy is read from file. (If not - specified, then the policy is read from - /etc/dnssec-policy.conf; if that file - doesn't exist, a built-in global default policy is used.) -

-
-
-f
-
-

- Force: allow updating of key events even if they are - already in the past. This is not recommended for use with - zones in which keys have already been published. However, - if a set of keys has been generated all of which have - publication and activation dates in the past, but the - keys have not been published in a zone as yet, then this - option can be used to clean them up and turn them into a - proper series of keys with appropriate rollover intervals. -

-
-
-g keygen-path
-
-

- Specifies a path to a dnssec-keygen binary. - Used for testing. - See also the -s option. -

-
-
-h
-
-

- Print the dnssec-keymgr help summary - and exit. -

-
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-k
-
-

- Only apply policies to KSK keys. - See also the -z option. -

-
-
-q
-
-

- Quiet: suppress printing of dnssec-keygen - and dnssec-settime. -

-
-
-s settime-path
-
-

- Specifies a path to a dnssec-settime binary. - Used for testing. - See also the -g option. -

-
-
-v
-
-

- Print the dnssec-keymgr version and exit. -

-
-
-z
-
-

- Only apply policies to ZSK keys. - See also the -k option. -

-
-
-
- -
-

POLICY CONFIGURATION

-

- The dnssec-policy.conf file can specify three kinds - of policies: -

-
    -
  • -

    - Policy classes - (policy name { ... };) - can be inherited by zone policies or other policy classes; these - can be used to create sets of different security profiles. For - example, a policy class normal might specify - 1024-bit key sizes, but a class extra might - specify 2048 bits instead; extra would be - used for zones that had unusually high security needs. -

    -
  • -
  • -

    - Algorithm policies: - (algorithm-policy algorithm { ... }; ) - override default per-algorithm settings. For example, by default, - RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This - can be modified using algorithm-policy, and the - new key sizes would then be used for any key of type RSASHA256. -

    -
  • -
  • -

    - Zone policies: - (zone name { ... }; ) - set policy for a single zone by name. A zone policy can inherit - a policy class by including a policy option. - Zone names beginning with digits (i.e., 0-9) must be quoted. - If a zone does not have its own policy then the - "default" policy applies. -

    -
  • -
-

- Options that can be specified in policies: -

-
-
algorithm - name;
-
-

- The key algorithm. If no policy is defined, the default is - RSASHA256. -

-
-
coverage - duration;
-
-

- The length of time to ensure that keys will be correct; no action - will be taken to create new keys to be activated after this time. - This can be represented as a number of seconds, or as a duration - using human-readable units (examples: "1y" or "6 months"). - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. - If no policy is configured, the default is six months. -

-
-
directory - path;
-
-

- Specifies the directory in which keys should be stored. -

-
-
key-size keytype - size;
-
-

- Specifies the number of bits to use in creating keys. - The keytype is either "zsk" or "ksk". - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is 2048 bits for RSA keys. -

-
-
keyttl - duration;
-
-

- The key TTL. If no policy is defined, the default is one hour. -

-
-
post-publish keytype - duration;
-
-

- How long after inactivation a key should be deleted from the zone. - Note: If roll-period is not set, this value is - ignored. The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm - policies as well as in policy classes or zone policies. The default - is one month. -

-
-
pre-publish keytype - duration;
-
-

- How long before activation a key should be published. Note: If - roll-period is not set, this value is ignored. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. The default is - one month. -

-
-
roll-period keytype - duration;
-
-

- How frequently keys should be rolled over. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is one year for ZSKs. KSKs do not - roll over by default. -

-
-
standby keytype - number;
-
-

- Not yet implemented. -

-
-
-
- -
-

REMAINING WORK

-
    -
  • -

    - Enable scheduling of KSK rollovers using the -P sync - and -D sync options to - dnssec-keygen and - dnssec-settime. Check the parent zone - (as in dnssec-checkds) to determine when it's - safe for the key to roll. -

    -
  • -
  • -

    - Allow configuration of standby keys and use of the REVOKE bit, - for keys that use RFC 5011 semantics. -

    -
  • -
-
- -
-

SEE ALSO

-

- - dnssec-coverage(8) - , - - dnssec-keygen(8) - , - - dnssec-settime(8) - , - - dnssec-checkds(8) - -

-
- -
- diff --git a/bin/python/dnssec-keymgr.py.in b/bin/python/dnssec-keymgr.py.in deleted file mode 100644 index c8453a78a6f..00000000000 --- a/bin/python/dnssec-keymgr.py.in +++ /dev/null @@ -1,27 +0,0 @@ -#!@PYTHON@ -############################################################################ -# 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. -############################################################################ - -import os -import sys - -sys.path.insert(0, os.path.dirname(sys.argv[0])) -if os.name != 'nt': - if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir - sys.path.insert(1, '@PYTHON_INSTALL_DIR@') - else: - sys.path.insert(1, os.path.join('@prefix@', 'lib', - 'python' + sys.version[:3], 'site-packages')) - -import isc.keymgr - -if __name__ == "__main__": - isc.keymgr.main() diff --git a/bin/python/isc/.gitignore b/bin/python/isc/.gitignore deleted file mode 100644 index 18f5372fc60..00000000000 --- a/bin/python/isc/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -__init__.py -checkds.py -coverage.py -dnskey.py -eventlist.py -keydict.py -keyevent.py -keymgr.py -keyseries.py -keyzone.py -parser.out -parsetab.py -policy.py -policy_test.py -rndc.py -tests/dnskey_test.py -utils.py diff --git a/bin/python/isc/Makefile.in b/bin/python/isc/Makefile.in deleted file mode 100644 index ec17b6bd45a..00000000000 --- a/bin/python/isc/Makefile.in +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -SUBDIRS = tests - -PYTHON = @PYTHON@ - -PYSRCS = __init__.py checkds.py coverage.py dnskey.py eventlist.py \ - keydict.py keyevent.py keymgr.py keyseries.py keyzone.py \ - policy.py rndc.py utils.py - -TARGETS = parsetab.py - -@BIND9_MAKE_RULES@ - -.SUFFIXES: .py .pyc -.py.pyc: - $(PYTHON) -m compileall . - -parsetab.py: policy.py - $(PYTHON) policy.py parse /dev/null > /dev/null - PYTHONPATH=${srcdir} $(PYTHON) -m parsetab - -check test: subdirs - -clean distclean:: - rm -f *.pyc parser.out parsetab.py - rm -rf __pycache__ build - -distclean:: - rm -rf ${PYSRCS} diff --git a/bin/python/isc/__init__.py.in b/bin/python/isc/__init__.py.in deleted file mode 100644 index 916333c3f89..00000000000 --- a/bin/python/isc/__init__.py.in +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -__all__ = ['checkds', 'coverage', 'keymgr', 'dnskey', 'eventlist', - 'keydict', 'keyevent', 'keyseries', 'keyzone', 'policy', - 'parsetab', 'rndc', 'utils'] - -from isc.dnskey import * -from isc.eventlist import * -from isc.keydict import * -from isc.keyevent import * -from isc.keyseries import * -from isc.keyzone import * -from isc.policy import * -from isc.rndc import * -from isc.utils import * diff --git a/bin/python/isc/checkds.py.in b/bin/python/isc/checkds.py.in deleted file mode 100644 index 0d71629436f..00000000000 --- a/bin/python/isc/checkds.py.in +++ /dev/null @@ -1,182 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import argparse -import os -import sys -from subprocess import Popen, PIPE - -from isc.utils import prefix,version - -prog = 'dnssec-checkds' - - -############################################################################ -# SECRR class: -# Class for DS resource record -############################################################################ -class SECRR: - hashalgs = {1: 'SHA-1', 2: 'SHA-256', 3: 'GOST', 4: 'SHA-384'} - rrname = '' - rrclass = 'IN' - keyid = None - keyalg = None - hashalg = None - digest = '' - ttl = 0 - - def __init__(self, rrtext): - if not rrtext: - raise Exception - - # 'str' does not have decode method in python3 - if type(rrtext) is not str: - fields = rrtext.decode('ascii').split() - else: - fields = rrtext.split() - if len(fields) < 7: - raise Exception - - self.rrtype = "DS" - self.rrname = fields[0].lower() - - fields = fields[1:] - if fields[0].upper() in ['IN', 'CH', 'HS']: - self.rrclass = fields[0].upper() - fields = fields[1:] - else: - self.ttl = int(fields[0]) - self.rrclass = fields[1].upper() - fields = fields[2:] - - if fields[0].upper() != self.rrtype: - raise Exception('%s does not match %s' % - (fields[0].upper(), self.rrtype)) - - self.keyid, self.keyalg, self.hashalg = map(int, fields[1:4]) - self.digest = ''.join(fields[4:]).upper() - - def __repr__(self): - return '%s %s %s %d %d %d %s' % \ - (self.rrname, self.rrclass, self.rrtype, - self.keyid, self.keyalg, self.hashalg, self.digest) - - def __eq__(self, other): - return self.__repr__() == other.__repr__() - - -############################################################################ -# check: -# Fetch DS RRset for the given zone from the DNS; fetch DNSKEY -# RRset from the masterfile if specified, or from DNS if not. -# Generate a set of expected DS records from the DNSKEY RRset, -# and report on congruency. -############################################################################ -def check(zone, args): - rrlist = [] - if args.dssetfile: - fp = open(args.dssetfile).read() - else: - cmd = [args.dig, "+noall", "+answer", "-t", "ds", "-q", zone] - fp, _ = Popen(cmd, stdout=PIPE).communicate() - - for line in fp.splitlines(): - if type(line) is not str: - line = line.decode('ascii') - rrlist.append(SECRR(line)) - rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg)) - - klist = [] - - cmd = [args.dsfromkey] - for algo in args.algo: - cmd += ['-a', algo] - - if args.masterfile: - cmd += ["-f", args.masterfile, zone] - fp, _ = Popen(cmd, stdout=PIPE).communicate() - else: - intods, _ = Popen([args.dig, "+noall", "+answer", "-t", "dnskey", - "-q", zone], stdout=PIPE).communicate() - cmd += ["-f", "-", zone] - fp, _ = Popen(cmd, stdin=PIPE, stdout=PIPE).communicate(intods) - - for line in fp.splitlines(): - if type(line) is not str: - line = line.decode('ascii') - klist.append(SECRR(line)) - - if len(klist) < 1: - print("No DNSKEY records found in zone apex") - return False - - match = True - for rr in rrlist: - if rr not in klist: - print("KSK for %s %s/%03d/%05d (%s) missing from child" % - (rr.rrtype, rr.rrname.strip('.'), rr.keyalg, - rr.keyid, SECRR.hashalgs[rr.hashalg])) - match = False - for rr in klist: - if rr not in rrlist: - print("%s for KSK %s/%03d/%05d (%s) missing from parent" % - (rr.rrtype, rr.rrname.strip('.'), rr.keyalg, - rr.keyid, SECRR.hashalgs[rr.hashalg])) - match = False - for rr in klist: - if rr in rrlist: - print("%s for KSK %s/%03d/%05d (%s) found in parent" % - (rr.rrtype, rr.rrname.strip('.'), rr.keyalg, - rr.keyid, SECRR.hashalgs[rr.hashalg])) - - return match - - -############################################################################ -# parse_args: -# Read command line arguments, set global 'args' structure -############################################################################ -def parse_args(): - parser = argparse.ArgumentParser(description=prog + ': checks DS coverage') - - bindir = 'bin' - sbindir = 'bin' if os.name == 'nt' else 'sbin' - - parser.add_argument('zone', type=str, help='zone to check') - parser.add_argument('-a', '--algo', dest='algo', action='append', - default=[], type=str, help='DS digest algorithm') - parser.add_argument('-d', '--dig', dest='dig', - default=os.path.join(prefix(bindir), 'dig'), - type=str, help='path to \'dig\'') - parser.add_argument('-D', '--dsfromkey', dest='dsfromkey', - default=os.path.join(prefix(sbindir), - 'dnssec-dsfromkey'), - type=str, help='path to \'dnssec-dsfromkey\'') - parser.add_argument('-f', '--file', dest='masterfile', type=str, - help='zone master file') - parser.add_argument('-s', '--dsset', dest='dssetfile', type=str, - help='prepared DSset file') - parser.add_argument('-v', '--version', action='version', - version=version) - args = parser.parse_args() - - args.zone = args.zone.strip('.') - - return args - - -############################################################################ -# Main -############################################################################ -def main(): - args = parse_args() - match = check(args.zone, args) - exit(0 if match else 1) diff --git a/bin/python/isc/coverage.py.in b/bin/python/isc/coverage.py.in deleted file mode 100644 index fe591431e82..00000000000 --- a/bin/python/isc/coverage.py.in +++ /dev/null @@ -1,290 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -from __future__ import print_function -import os -import sys -import argparse -import glob -import re -import time -import calendar -import pprint -from collections import defaultdict - -prog = 'dnssec-coverage' - -from isc import dnskey, eventlist, keydict, keyevent, keyzone, utils - -############################################################################ -# print a fatal error and exit -############################################################################ -def fatal(*args, **kwargs): - print(*args, **kwargs) - sys.exit(1) - - -############################################################################ -# output: -############################################################################ -_firstline = True -def output(*args, **kwargs): - """output text, adding a vertical space this is *not* the first - first section being printed since a call to vreset()""" - global _firstline - if 'skip' in kwargs: - skip = kwargs['skip'] - kwargs.pop('skip', None) - else: - skip = True - if _firstline: - _firstline = False - elif skip: - print('') - if args: - print(*args, **kwargs) - - -def vreset(): - """reset vertical spacing""" - global _firstline - _firstline = True - - -############################################################################ -# parse_time -############################################################################ -def parse_time(s): - """ convert a formatted time (e.g., 1y, 6mo, 15mi, etc) into seconds - :param s: String with some text representing a time interval - :return: Integer with the number of seconds in the time interval - """ - s = s.strip() - - # if s is an integer, we're done already - try: - return int(s) - except ValueError: - pass - - # try to parse as a number with a suffix indicating unit of time - r = re.compile(r'([0-9][0-9]*)\s*([A-Za-z]*)') - m = r.match(s) - if not m: - raise ValueError("Cannot parse %s" % s) - n, unit = m.groups() - n = int(n) - unit = unit.lower() - if unit.startswith('y'): - return n * 31536000 - elif unit.startswith('mo'): - return n * 2592000 - elif unit.startswith('w'): - return n * 604800 - elif unit.startswith('d'): - return n * 86400 - elif unit.startswith('h'): - return n * 3600 - elif unit.startswith('mi'): - return n * 60 - elif unit.startswith('s'): - return n - else: - raise ValueError("Invalid suffix %s" % unit) - - -############################################################################ -# set_path: -############################################################################ -def set_path(command, default=None): - """ find the location of a specified command. if a default is supplied - and it works, we use it; otherwise we search PATH for a match. - :param command: string with a command to look for in the path - :param default: default location to use - :return: detected location for the desired command - """ - - fpath = default - if not fpath or not os.path.isfile(fpath) or not os.access(fpath, os.X_OK): - path = os.environ["PATH"] - if not path: - path = os.path.defpath - for directory in path.split(os.pathsep): - fpath = os.path.join(directory, command) - if os.path.isfile(fpath) and os.access(fpath, os.X_OK): - break - fpath = None - - return fpath - - -############################################################################ -# parse_args: -############################################################################ -def parse_args(): - """Read command line arguments, set global 'args' structure""" - compilezone = set_path('named-compilezone', - os.path.join(utils.prefix('sbin'), - 'named-compilezone')) - - parser = argparse.ArgumentParser(description=prog + ': checks future ' + - 'DNSKEY coverage for a zone') - - parser.add_argument('zone', type=str, nargs='*', default=None, - help='zone(s) to check' + - '(default: all zones in the directory)') - parser.add_argument('-K', dest='path', default='.', type=str, - help='a directory containing keys to process', - metavar='dir') - parser.add_argument('-f', dest='filename', type=str, - help='zone master file', metavar='file') - parser.add_argument('-m', dest='maxttl', type=str, - help='the longest TTL in the zone(s)', - metavar='time') - parser.add_argument('-d', dest='keyttl', type=str, - help='the DNSKEY TTL', metavar='time') - parser.add_argument('-r', dest='resign', default='1944000', - type=str, help='the RRSIG refresh interval ' - 'in seconds [default: 22.5 days]', - metavar='time') - parser.add_argument('-c', dest='compilezone', - default=compilezone, type=str, - help='path to \'named-compilezone\'', - metavar='path') - parser.add_argument('-l', dest='checklimit', - type=str, default='0', - help='Length of time to check for ' - 'DNSSEC coverage [default: 0 (unlimited)]', - metavar='time') - parser.add_argument('-z', dest='no_ksk', - action='store_true', default=False, - help='Only check zone-signing keys (ZSKs)') - parser.add_argument('-k', dest='no_zsk', - action='store_true', default=False, - help='Only check key-signing keys (KSKs)') - parser.add_argument('-D', '--debug', dest='debug_mode', - action='store_true', default=False, - help='Turn on debugging output') - parser.add_argument('-v', '--version', action='version', - version=utils.version) - - args = parser.parse_args() - - if args.no_zsk and args.no_ksk: - fatal("ERROR: -z and -k cannot be used together.") - elif args.no_zsk or args.no_ksk: - args.keytype = "KSK" if args.no_zsk else "ZSK" - else: - args.keytype = None - - if args.filename and len(args.zone) > 1: - fatal("ERROR: -f can only be used with one zone.") - - # strip trailing dots if any - args.zone = [x[:-1] if (len(x) > 1 and x[-1] == '.') else x - for x in args.zone] - - # convert from time arguments to seconds - try: - if args.maxttl: - m = parse_time(args.maxttl) - args.maxttl = m - except ValueError: - pass - - try: - if args.keyttl: - k = parse_time(args.keyttl) - args.keyttl = k - except ValueError: - pass - - try: - if args.resign: - r = parse_time(args.resign) - args.resign = r - except ValueError: - pass - - try: - if args.checklimit: - lim = args.checklimit - r = parse_time(args.checklimit) - if r == 0: - args.checklimit = None - else: - args.checklimit = time.time() + r - except ValueError: - pass - - # if we've got the values we need from the command line, stop now - if args.maxttl and args.keyttl: - return args - - # load keyttl and maxttl data from zonefile - if args.zone and args.filename: - try: - zone = keyzone(args.zone[0], args.filename, args.compilezone) - args.maxttl = args.maxttl or zone.maxttl - args.keyttl = args.maxttl or zone.keyttl - except Exception as e: - print("Unable to load zone data from %s: " % args.filename, e) - - if not args.maxttl: - output("WARNING: Maximum TTL value was not specified. Using 1 week\n" - "\t (604800 seconds); re-run with the -m option to get more\n" - "\t accurate results.") - args.maxttl = 604800 - - return args - -############################################################################ -# Main -############################################################################ -def main(): - args = parse_args() - - print("PHASE 1--Loading keys to check for internal timing problems") - - try: - kd = keydict(path=args.path, zones=args.zone, keyttl=args.keyttl) - except Exception as e: - fatal('ERROR: Unable to build key dictionary: ' + str(e)) - - for key in kd: - key.check_prepub(output) - if key.sep: - key.check_postpub(output) - else: - key.check_postpub(output, args.maxttl + args.resign) - - output("PHASE 2--Scanning future key events for coverage failures") - vreset() - - try: - elist = eventlist(kd) - except Exception as e: - fatal('ERROR: Unable to build event list: ' + str(e)) - - errors = False - if not args.zone: - if not elist.coverage(None, args.keytype, args.checklimit, output): - errors = True - else: - for zone in args.zone: - try: - if not elist.coverage(zone, args.keytype, - args.checklimit, output): - errors = True - except: - output('ERROR: Coverage check failed for zone ' + zone) - - sys.exit(1 if errors else 0) diff --git a/bin/python/isc/dnskey.py.in b/bin/python/isc/dnskey.py.in deleted file mode 100644 index 83017c457fd..00000000000 --- a/bin/python/isc/dnskey.py.in +++ /dev/null @@ -1,511 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import os -import time -import calendar -from subprocess import Popen, PIPE - -######################################################################## -# Class dnskey -######################################################################## -class TimePast(Exception): - def __init__(self, key, prop, value): - super(TimePast, self).__init__('%s time for key %s (%d) is already past' - % (prop, key, value)) - -class dnskey: - """An individual DNSSEC key. Identified by path, name, algorithm, keyid. - Contains a dictionary of metadata events.""" - - _PROPS = ('Created', 'Publish', 'Activate', 'Inactive', 'Delete', - 'Revoke', 'DSPublish', 'SyncPublish', 'SyncDelete') - _OPTS = (None, '-P', '-A', '-I', '-D', '-R', None, '-Psync', '-Dsync') - - _ALGNAMES = (None, 'RSAMD5', 'DH', 'DSA', None, 'RSASHA1', - 'NSEC3DSA', 'NSEC3RSASHA1', 'RSASHA256', None, - 'RSASHA512', None, 'ECCGOST', 'ECDSAP256SHA256', - 'ECDSAP384SHA384', 'ED25519', 'ED448') - - def __init__(self, key, directory=None, keyttl=None): - # this makes it possible to use algname as a class or instance method - if isinstance(key, tuple) and len(key) == 3: - self._dir = directory or '.' - (name, alg, keyid) = key - self.fromtuple(name, alg, keyid, keyttl) - - self._dir = directory or os.path.dirname(key) or '.' - key = os.path.basename(key) - (name, alg, keyid) = key.split('+') - name = name[1:-1] - alg = int(alg) - keyid = int(keyid.split('.')[0]) - self.fromtuple(name, alg, keyid, keyttl) - - def fromtuple(self, name, alg, keyid, keyttl): - if name.endswith('.'): - fullname = name - name = name.rstrip('.') - else: - fullname = name + '.' - - keystr = "K%s+%03d+%05d" % (fullname, alg, keyid) - key_file = self._dir + (self._dir and os.sep or '') + keystr + ".key" - private_file = (self._dir + (self._dir and os.sep or '') + - keystr + ".private") - - self.keystr = keystr - - self.name = name - self.alg = int(alg) - self.keyid = int(keyid) - self.fullname = fullname - - kfp = open(key_file, "r") - for line in kfp: - if line[0] == ';': - continue - tokens = line.split() - if not tokens: - continue - - if tokens[1].lower() in ('in', 'ch', 'hs'): - septoken = 3 - self.ttl = keyttl - else: - septoken = 4 - self.ttl = int(tokens[1]) if not keyttl else keyttl - - if (int(tokens[septoken]) & 0x1) == 1: - self.sep = True - else: - self.sep = False - kfp.close() - - pfp = open(private_file, "rU") - - self.metadata = dict() - self._changed = dict() - self._delete = dict() - self._times = dict() - self._fmttime = dict() - self._timestamps = dict() - self._original = dict() - self._origttl = None - - for line in pfp: - line = line.strip() - if not line or line[0] in ('!#'): - continue - punctuation = [line.find(c) for c in ':= '] + [len(line)] - found = min([pos for pos in punctuation if pos != -1]) - name = line[:found].rstrip() - value = line[found:].lstrip(":= ").rstrip() - self.metadata[name] = value - - for prop in dnskey._PROPS: - self._changed[prop] = False - if prop in self.metadata: - t = self.parsetime(self.metadata[prop]) - self._times[prop] = t - self._fmttime[prop] = self.formattime(t) - self._timestamps[prop] = self.epochfromtime(t) - self._original[prop] = self._timestamps[prop] - else: - self._times[prop] = None - self._fmttime[prop] = None - self._timestamps[prop] = None - self._original[prop] = None - - pfp.close() - - def commit(self, settime_bin, **kwargs): - quiet = kwargs.get('quiet', False) - cmd = [] - first = True - - if self._origttl is not None: - cmd += ["-L", str(self.ttl)] - - for prop, opt in zip(dnskey._PROPS, dnskey._OPTS): - if not opt or not self._changed[prop]: - continue - - delete = False - if prop in self._delete and self._delete[prop]: - delete = True - - when = 'none' if delete else self._fmttime[prop] - cmd += [opt, when] - first = False - - if cmd: - fullcmd = [settime_bin, "-K", self._dir] + cmd + [self.keystr,] - if not quiet: - print('# ' + ' '.join(fullcmd)) - try: - p = Popen(fullcmd, stdout=PIPE, stderr=PIPE) - stdout, stderr = p.communicate() - if stderr: - raise Exception(str(stderr)) - except Exception as e: - raise Exception('unable to run %s: %s' % - (settime_bin, str(e))) - self._origttl = None - for prop in dnskey._PROPS: - self._original[prop] = self._timestamps[prop] - self._changed[prop] = False - - @classmethod - def generate(cls, keygen_bin, randomdev, keys_dir, name, alg, keysize, sep, - ttl, publish=None, activate=None, **kwargs): - quiet = kwargs.get('quiet', False) - - keygen_cmd = [keygen_bin, "-q", "-K", keys_dir, "-L", str(ttl)] - - if randomdev: - keygen_cmd += ["-r", randomdev] - - if sep: - keygen_cmd.append("-fk") - - if alg: - keygen_cmd += ["-a", alg] - - if keysize: - keygen_cmd += ["-b", str(keysize)] - - if publish: - t = dnskey.timefromepoch(publish) - keygen_cmd += ["-P", dnskey.formattime(t)] - - if activate: - t = dnskey.timefromepoch(activate) - keygen_cmd += ["-A", dnskey.formattime(activate)] - - keygen_cmd.append(name) - - if not quiet: - print('# ' + ' '.join(keygen_cmd)) - - p = Popen(keygen_cmd, stdout=PIPE, stderr=PIPE) - stdout, stderr = p.communicate() - if stderr: - raise Exception('unable to generate key: ' + str(stderr)) - - try: - keystr = stdout.splitlines()[0].decode('ascii') - newkey = dnskey(keystr, keys_dir, ttl) - return newkey - except Exception as e: - raise Exception('unable to parse generated key: %s' % str(e)) - - def generate_successor(self, keygen_bin, randomdev, prepublish, **kwargs): - quiet = kwargs.get('quiet', False) - - if not self.inactive(): - raise Exception("predecessor key %s has no inactive date" % self) - - keygen_cmd = [keygen_bin, "-q", "-K", self._dir, "-S", self.keystr] - - if self.ttl: - keygen_cmd += ["-L", str(self.ttl)] - - if randomdev: - keygen_cmd += ["-r", randomdev] - - if prepublish: - keygen_cmd += ["-i", str(prepublish)] - - if not quiet: - print('# ' + ' '.join(keygen_cmd)) - - p = Popen(keygen_cmd, stdout=PIPE, stderr=PIPE) - stdout, stderr = p.communicate() - if stderr: - raise Exception('unable to generate key: ' + stderr) - - try: - keystr = stdout.splitlines()[0].decode('ascii') - newkey = dnskey(keystr, self._dir, self.ttl) - return newkey - except: - raise Exception('unable to generate successor for key %s' % self) - - @staticmethod - def algstr(alg): - name = None - if alg in range(len(dnskey._ALGNAMES)): - name = dnskey._ALGNAMES[alg] - return name if name else ("%03d" % alg) - - @staticmethod - def algnum(alg): - if not alg: - return None - alg = alg.upper() - try: - return dnskey._ALGNAMES.index(alg) - except ValueError: - return None - - def algname(self, alg=None): - return self.algstr(alg or self.alg) - - @staticmethod - def timefromepoch(secs): - return time.gmtime(secs) - - @staticmethod - def parsetime(string): - return time.strptime(string, "%Y%m%d%H%M%S") - - @staticmethod - def epochfromtime(t): - return calendar.timegm(t) - - @staticmethod - def formattime(t): - return time.strftime("%Y%m%d%H%M%S", t) - - def setmeta(self, prop, secs, now, **kwargs): - force = kwargs.get('force', False) - - if self._timestamps[prop] == secs: - return - - if self._original[prop] is not None and \ - self._original[prop] < now and not force: - raise TimePast(self, prop, self._original[prop]) - - if secs is None: - self._changed[prop] = False \ - if self._original[prop] is None else True - - self._delete[prop] = True - self._timestamps[prop] = None - self._times[prop] = None - self._fmttime[prop] = None - return - - t = self.timefromepoch(secs) - self._timestamps[prop] = secs - self._times[prop] = t - self._fmttime[prop] = self.formattime(t) - self._changed[prop] = False if \ - self._original[prop] == self._timestamps[prop] else True - - def gettime(self, prop): - return self._times[prop] - - def getfmttime(self, prop): - return self._fmttime[prop] - - def gettimestamp(self, prop): - return self._timestamps[prop] - - def created(self): - return self._timestamps["Created"] - - def syncpublish(self): - return self._timestamps["SyncPublish"] - - def setsyncpublish(self, secs, now=time.time(), **kwargs): - self.setmeta("SyncPublish", secs, now, **kwargs) - - def publish(self): - return self._timestamps["Publish"] - - def setpublish(self, secs, now=time.time(), **kwargs): - self.setmeta("Publish", secs, now, **kwargs) - - def activate(self): - return self._timestamps["Activate"] - - def setactivate(self, secs, now=time.time(), **kwargs): - self.setmeta("Activate", secs, now, **kwargs) - - def revoke(self): - return self._timestamps["Revoke"] - - def setrevoke(self, secs, now=time.time(), **kwargs): - self.setmeta("Revoke", secs, now, **kwargs) - - def inactive(self): - return self._timestamps["Inactive"] - - def setinactive(self, secs, now=time.time(), **kwargs): - self.setmeta("Inactive", secs, now, **kwargs) - - def delete(self): - return self._timestamps["Delete"] - - def setdelete(self, secs, now=time.time(), **kwargs): - self.setmeta("Delete", secs, now, **kwargs) - - def syncdelete(self): - return self._timestamps["SyncDelete"] - - def setsyncdelete(self, secs, now=time.time(), **kwargs): - self.setmeta("SyncDelete", secs, now, **kwargs) - - def setttl(self, ttl): - if ttl is None or self.ttl == ttl: - return - elif self._origttl is None: - self._origttl = self.ttl - self.ttl = ttl - elif self._origttl == ttl: - self._origttl = None - self.ttl = ttl - else: - self.ttl = ttl - - def keytype(self): - return ("KSK" if self.sep else "ZSK") - - def __str__(self): - return ("%s/%s/%05d" - % (self.name, self.algname(), self.keyid)) - - def __repr__(self): - return ("%s/%s/%05d (%s)" - % (self.name, self.algname(), self.keyid, - ("KSK" if self.sep else "ZSK"))) - - def date(self): - return (self.activate() or self.publish() or self.created()) - - # keys are sorted first by zone name, then by algorithm. within - # the same name/algorithm, they are sorted according to their - # 'date' value: the activation date if set, OR the publication - # if set, OR the creation date. - def __lt__(self, other): - if self.name != other.name: - return self.name < other.name - if self.alg != other.alg: - return self.alg < other.alg - return self.date() < other.date() - - def check_prepub(self, output=None): - def noop(*args, **kwargs): pass - if not output: - output = noop - - now = int(time.time()) - a = self.activate() - p = self.publish() - - if not a: - return False - - if not p: - if a > now: - output("WARNING: Key %s is scheduled for\n" - "\t activation but not for publication." - % repr(self)) - return False - - if p <= now and a <= now: - return True - - if p == a: - output("WARNING: %s is scheduled to be\n" - "\t published and activated at the same time. This\n" - "\t could result in a coverage gap if the zone was\n" - "\t previously signed. Activation should be at least\n" - "\t %s after publication." - % (repr(self), - dnskey.duration(self.ttl) or 'one DNSKEY TTL')) - return True - - if a < p: - output("WARNING: Key %s is active before it is published" - % repr(self)) - return False - - if self.ttl is not None and a - p < self.ttl: - output("WARNING: Key %s is activated too soon\n" - "\t after publication; this could result in coverage \n" - "\t gaps due to resolver caches containing old data.\n" - "\t Activation should be at least %s after\n" - "\t publication." - % (repr(self), - dnskey.duration(self.ttl) or 'one DNSKEY TTL')) - return False - - return True - - def check_postpub(self, output = None, timespan = None): - def noop(*args, **kwargs): pass - if output is None: - output = noop - - if timespan is None: - timespan = self.ttl - - if timespan is None: - output("WARNING: Key %s using default TTL." % repr(self)) - timespan = (60*60*24) - - now = time.time() - d = self.delete() - i = self.inactive() - - if not d: - return False - - if not i: - if d > now: - output("WARNING: Key %s is scheduled for\n" - "\t deletion but not for inactivation." % repr(self)) - return False - - if d < now and i < now: - return True - - if d < i: - output("WARNING: Key %s is scheduled for\n" - "\t deletion before inactivation." - % repr(self)) - return False - - if d - i < timespan: - output("WARNING: Key %s scheduled for\n" - "\t deletion too soon after deactivation; this may \n" - "\t result in coverage gaps due to resolver caches\n" - "\t containing old data. Deletion should be at least\n" - "\t %s after inactivation." - % (repr(self), dnskey.duration(timespan))) - return False - - return True - - @staticmethod - def duration(secs): - if not secs: - return None - - units = [("year", 60*60*24*365), - ("month", 60*60*24*30), - ("day", 60*60*24), - ("hour", 60*60), - ("minute", 60), - ("second", 1)] - - output = [] - for unit in units: - v, secs = secs // unit[1], secs % unit[1] - if v > 0: - output.append("%d %s%s" % (v, unit[0], "s" if v > 1 else "")) - - return ", ".join(output) - diff --git a/bin/python/isc/eventlist.py.in b/bin/python/isc/eventlist.py.in deleted file mode 100644 index cb72c6e0b8b..00000000000 --- a/bin/python/isc/eventlist.py.in +++ /dev/null @@ -1,166 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -from collections import defaultdict -from .dnskey import * -from .keydict import * -from .keyevent import * - - -class eventlist: - _K = defaultdict(lambda: defaultdict(list)) - _Z = defaultdict(lambda: defaultdict(list)) - _zones = set() - _kdict = None - - def __init__(self, kdict): - properties = ["SyncPublish", "Publish", "SyncDelete", - "Activate", "Inactive", "Delete"] - self._kdict = kdict - for zone in kdict.zones(): - self._zones.add(zone) - for alg, keys in kdict[zone].items(): - for k in keys.values(): - for prop in properties: - t = k.gettime(prop) - if not t: - continue - e = keyevent(prop, k, t) - if k.sep: - self._K[zone][alg].append(e) - else: - self._Z[zone][alg].append(e) - - self._K[zone][alg] = sorted(self._K[zone][alg], - key=lambda event: event.when) - self._Z[zone][alg] = sorted(self._Z[zone][alg], - key=lambda event: event.when) - - # scan events per zone, algorithm, and key type, in order of - # occurrence, noting inconsistent states when found - def coverage(self, zone, keytype, until, output = None): - def noop(*args, **kwargs): pass - if not output: - output = noop - - no_zsk = True if (keytype and keytype == "KSK") else False - no_ksk = True if (keytype and keytype == "ZSK") else False - kok = zok = True - found = False - - if zone and not zone in self._zones: - output("ERROR: No key events found for %s" % zone) - return False - - if zone: - found = True - if not no_ksk: - kok = self.checkzone(zone, "KSK", until, output) - if not no_zsk: - zok = self.checkzone(zone, "ZSK", until, output) - else: - for z in self._zones: - if not no_ksk and z in self._K.keys(): - found = True - kok = self.checkzone(z, "KSK", until, output) - if not no_zsk and z in self._Z.keys(): - found = True - zok = self.checkzone(z, "ZSK", until, output) - - if not found: - output("ERROR: No key events found") - return False - - return (kok and zok) - - def checkzone(self, zone, keytype, until, output): - allok = True - if keytype == "KSK": - kz = self._K[zone] - else: - kz = self._Z[zone] - - for alg in kz.keys(): - output("Checking scheduled %s events for zone %s, " - "algorithm %s..." % - (keytype, zone, dnskey.algstr(alg))) - ok = eventlist.checkset(kz[alg], keytype, until, output) - if ok: - output("No errors found") - allok = allok and ok - - return allok - - @staticmethod - def showset(eventset, output): - if not eventset: - return - output(" " + eventset[0].showtime() + ":", skip=False) - for event in eventset: - output(" %s: %s" % (event.what, repr(event.key)), skip=False) - - @staticmethod - def checkset(eventset, keytype, until, output): - groups = list() - group = list() - - # collect up all events that have the same time - eventsfound = False - for event in eventset: - # we found an event - eventsfound = True - - # add event to current group - if (not group or group[0].when == event.when): - group.append(event) - - # if we're at the end of the list, we're done. if - # we've found an event with a later time, start a new group - if (group[0].when != event.when): - groups.append(group) - group = list() - group.append(event) - - if group: - groups.append(group) - - if not eventsfound: - output("ERROR: No %s events found" % keytype) - return False - - active = published = None - for group in groups: - if (until and calendar.timegm(group[0].when) > until): - output("Ignoring events after %s" % - time.strftime("%a %b %d %H:%M:%S UTC %Y", - time.gmtime(until))) - return True - - for event in group: - (active, published) = event.status(active, published) - - eventlist.showset(group, output) - - # and then check for inconsistencies: - if not active: - output("ERROR: No %s's are active after this event" % keytype) - return False - elif not published: - output("ERROR: No %s's are published after this event" - % keytype) - return False - elif not published.intersection(active): - output("ERROR: No %s's are both active and published " - "after this event" % keytype) - return False - - return True - diff --git a/bin/python/isc/keydict.py.in b/bin/python/isc/keydict.py.in deleted file mode 100644 index e4dcb08fc21..00000000000 --- a/bin/python/isc/keydict.py.in +++ /dev/null @@ -1,87 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -from collections import defaultdict -from . import dnskey -import os -import glob - - -######################################################################## -# Class keydict -######################################################################## -class keydict: - """ A dictionary of keys, indexed by name, algorithm, and key id """ - - _keydict = defaultdict(lambda: defaultdict(dict)) - _defttl = None - _missing = [] - - def __init__(self, dp=None, **kwargs): - self._defttl = kwargs.get('keyttl', None) - zones = kwargs.get('zones', None) - - if not zones: - path = kwargs.get('path',None) or '.' - self.readall(path) - else: - for zone in zones: - if 'path' in kwargs and kwargs['path'] is not None: - path = kwargs['path'] - else: - path = dp and dp.policy(zone).directory or '.' - if not self.readone(path, zone): - self._missing.append(zone) - - def readall(self, path): - files = glob.glob(os.path.join(path, '*.private')) - - for infile in files: - key = dnskey(infile, path, self._defttl) - self._keydict[key.name][key.alg][key.keyid] = key - - def readone(self, path, zone): - if not zone.endswith('.'): - zone += '.' - match='K' + zone + '+*.private' - files = glob.glob(os.path.join(path, match)) - - found = False - for infile in files: - key = dnskey(infile, path, self._defttl) - if key.fullname != zone: # shouldn't ever happen - continue - keyname=key.name if zone != '.' else '.' - self._keydict[keyname][key.alg][key.keyid] = key - found = True - - return found - - def __iter__(self): - for zone, algorithms in self._keydict.items(): - for alg, keys in algorithms.items(): - for key in keys.values(): - yield key - - def __getitem__(self, name): - return self._keydict[name] - - def zones(self): - return (self._keydict.keys()) - - def algorithms(self, zone): - return (self._keydict[zone].keys()) - - def keys(self, zone, alg): - return (self._keydict[zone][alg].keys()) - - def missing(self): - return (self._missing) diff --git a/bin/python/isc/keyevent.py.in b/bin/python/isc/keyevent.py.in deleted file mode 100644 index cfc935a643c..00000000000 --- a/bin/python/isc/keyevent.py.in +++ /dev/null @@ -1,76 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import time - - -######################################################################## -# Class keyevent -######################################################################## -class keyevent: - """ A discrete key event, e.g., Publish, Activate, Inactive, Delete, - etc. Stores the date of the event, and identifying information - about the key to which the event will occur.""" - - def __init__(self, what, key, when=None): - self.what = what - self.when = when or key.gettime(what) - self.key = key - self.sep = key.sep - self.zone = key.name - self.alg = key.alg - self.keyid = key.keyid - - def __repr__(self): - return repr((self.when, self.what, self.keyid, self.sep, - self.zone, self.alg)) - - def showtime(self): - return time.strftime("%a %b %d %H:%M:%S UTC %Y", self.when) - - # update sets of active and published keys, based on - # the contents of this keyevent - def status(self, active, published, output = None): - def noop(*args, **kwargs): pass - if not output: - output = noop - - if not active: - active = set() - if not published: - published = set() - - if self.what == "Activate": - active.add(self.keyid) - elif self.what == "Publish": - published.add(self.keyid) - elif self.what == "Inactive": - if self.keyid not in active: - output("\tWARNING: %s scheduled to become inactive " - "before it is active" - % repr(self.key)) - else: - active.remove(self.keyid) - elif self.what == "Delete": - if self.keyid in published: - published.remove(self.keyid) - else: - output("WARNING: key %s is scheduled for deletion " - "before it is published" % repr(self.key)) - elif self.what == "Revoke": - # We don't need to worry about the logic of this one; - # just stop counting this key as either active or published - if self.keyid in published: - published.remove(self.keyid) - if self.keyid in active: - active.remove(self.keyid) - - return active, published diff --git a/bin/python/isc/keymgr.py.in b/bin/python/isc/keymgr.py.in deleted file mode 100644 index 2b78f05bea7..00000000000 --- a/bin/python/isc/keymgr.py.in +++ /dev/null @@ -1,157 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -from __future__ import print_function -import os, sys, argparse, glob, re, time, calendar, pprint -from collections import defaultdict - -prog='dnssec-keymgr' - -from isc import dnskey, keydict, keyseries, policy, parsetab, utils - -############################################################################ -# print a fatal error and exit -############################################################################ -def fatal(*args, **kwargs): - print(*args, **kwargs) - sys.exit(1) - -############################################################################ -# find the location of an external command -############################################################################ -def set_path(command, default=None): - """ find the location of a specified command. If a default is supplied, - exists and it's an executable, we use it; otherwise we search PATH - for an alternative. - :param command: command to look for - :param default: default value to use - :return: PATH with the location of a suitable binary - """ - fpath = default - if not fpath or not os.path.isfile(fpath) or not os.access(fpath, os.X_OK): - path = os.environ["PATH"] - if not path: - path = os.path.defpath - for directory in path.split(os.pathsep): - fpath = directory + os.sep + command - if os.path.isfile(fpath) and os.access(fpath, os.X_OK): - break - fpath = None - - return fpath - -############################################################################ -# parse arguments -############################################################################ -def parse_args(): - """ Read command line arguments, returns 'args' object - :return: args object properly prepared - """ - - keygen = set_path('dnssec-keygen', - os.path.join(utils.prefix('sbin'), 'dnssec-keygen')) - settime = set_path('dnssec-settime', - os.path.join(utils.prefix('sbin'), 'dnssec-settime')) - - parser = argparse.ArgumentParser(description=prog + ': schedule ' - 'DNSSEC key rollovers according to a ' - 'pre-defined policy') - - parser.add_argument('zone', type=str, nargs='*', default=None, - help='Zone(s) to which the policy should be applied ' + - '(default: all zones in the directory)') - parser.add_argument('-K', dest='path', type=str, - help='Directory containing keys', metavar='dir') - parser.add_argument('-c', dest='policyfile', type=str, - help='Policy definition file', metavar='file') - parser.add_argument('-g', dest='keygen', default=keygen, type=str, - help='Path to \'dnssec-keygen\'', - metavar='path') - parser.add_argument('-r', dest='randomdev', type=str, default=None, - help='DEPRECATED', - metavar='path') - parser.add_argument('-s', dest='settime', default=settime, type=str, - help='Path to \'dnssec-settime\'', - metavar='path') - parser.add_argument('-k', dest='no_zsk', - action='store_true', default=False, - help='Only apply policy to key-signing keys (KSKs)') - parser.add_argument('-z', dest='no_ksk', - action='store_true', default=False, - help='Only apply policy to zone-signing keys (ZSKs)') - parser.add_argument('-f', '--force', dest='force', action='store_true', - default=False, help='Force updates to key events '+ - 'even if they are in the past') - parser.add_argument('-q', '--quiet', dest='quiet', action='store_true', - default=False, help='Update keys silently') - parser.add_argument('-v', '--version', action='version', - version=utils.version) - - args = parser.parse_args() - - if args.randomdev: - fatal("ERROR: -r option has been deprecated.") - - if args.no_zsk and args.no_ksk: - fatal("ERROR: -z and -k cannot be used together.") - - if args.keygen is None: - fatal("ERROR: dnssec-keygen not found") - - if args.settime is None: - fatal("ERROR: dnssec-settime not found") - - # if a policy file was specified, check that it exists. - # if not, use the default file, unless it doesn't exist - if args.policyfile is not None: - if not os.path.exists(args.policyfile): - fatal('ERROR: Policy file "%s" not found' % args.policyfile) - else: - args.policyfile = os.path.join(utils.sysconfdir, - 'dnssec-policy.conf') - if not os.path.exists(args.policyfile): - args.policyfile = None - - return args - -############################################################################ -# main -############################################################################ -def main(): - args = parse_args() - - # As we may have specific locations for the binaries, we put that info - # into a context object that can be passed around - context = {'keygen_path': args.keygen, - 'settime_path': args.settime, - 'keys_path': args.path, - 'randomdev': args.randomdev} - - try: - dp = policy.dnssec_policy(args.policyfile) - except Exception as e: - fatal('Unable to load DNSSEC policy: ' + str(e)) - - try: - kd = keydict(dp, path=args.path, zones=args.zone) - except Exception as e: - fatal('Unable to build key dictionary: ' + str(e)) - - try: - ks = keyseries(kd, context=context) - except Exception as e: - fatal('Unable to build key series: ' + str(e)) - - try: - ks.enforce_policy(dp, ksk=args.no_zsk, zsk=args.no_ksk, - force=args.force, quiet=args.quiet) - except Exception as e: - fatal('Unable to apply policy: ' + str(e)) diff --git a/bin/python/isc/keyseries.py.in b/bin/python/isc/keyseries.py.in deleted file mode 100644 index 2f4906f809a..00000000000 --- a/bin/python/isc/keyseries.py.in +++ /dev/null @@ -1,220 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -from collections import defaultdict -from .dnskey import * -from .keydict import * -from .keyevent import * -from .policy import * -import time - - -class keyseries: - _K = defaultdict(lambda: defaultdict(list)) - _Z = defaultdict(lambda: defaultdict(list)) - _zones = set() - _kdict = None - _context = None - - def __init__(self, kdict, now=time.time(), context=None): - self._kdict = kdict - self._context = context - self._zones = set(kdict.missing()) - - for zone in kdict.zones(): - self._zones.add(zone) - for alg, keys in kdict[zone].items(): - for k in keys.values(): - if k.sep: - if not (k.delete() and k.delete() < now): - self._K[zone][alg].append(k) - else: - if not (k.delete() and k.delete() < now): - self._Z[zone][alg].append(k) - - self._K[zone][alg].sort() - self._Z[zone][alg].sort() - - def __iter__(self): - for zone in self._zones: - for collection in [self._K, self._Z]: - if zone not in collection: - continue - for alg, keys in collection[zone].items(): - for key in keys: - yield key - - def dump(self): - for k in self: - print("%s" % repr(k)) - - def fixseries(self, keys, policy, now, **kwargs): - force = kwargs.get('force', False) - if not keys: - return - - # handle the first key - key = keys[0] - if key.sep: - rp = policy.ksk_rollperiod - prepub = policy.ksk_prepublish or (30 * 86400) - postpub = policy.ksk_postpublish or (30 * 86400) - else: - rp = policy.zsk_rollperiod - prepub = policy.zsk_prepublish or (30 * 86400) - postpub = policy.zsk_postpublish or (30 * 86400) - - # the first key should be published and active - p = key.publish() - a = key.activate() - if not p or p > now: - key.setpublish(now) - p = now - if not a or a > now: - key.setactivate(now) - a = now - - i = key.inactive() - fudge = 300 - if not rp: - key.setinactive(None, **kwargs) - key.setdelete(None, **kwargs) - elif not i or a + rp != i: - if not i and a + rp > now + prepub + fudge: - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - elif not i: - key.setinactive(now + prepub + fudge, **kwargs) - key.setdelete(now + prepub + postpub + fudge, **kwargs) - elif i < now: - pass - elif a + rp > i: - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - elif a + rp > now + prepub + fudge: - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - else: - key.setinactive(now + prepub + fudge, **kwargs) - key.setdelete(now + prepub + postpub + fudge, **kwargs) - else: - d = key.delete() - if not d or i + postpub > now + fudge: - key.setdelete(i + postpub, **kwargs) - elif not d: - key.setdelete(now + postpub + fudge, **kwargs) - elif d < now + fudge: - pass - elif d < i + postpub: - key.setdelete(i + postpub, **kwargs) - - if policy.keyttl != key.ttl: - key.setttl(policy.keyttl) - - # handle all the subsequent keys - prev = key - for key in keys[1:]: - # if no rollperiod, then all keys after the first in - # the series kept inactive. - # (XXX: we need to change this to allow standby keys) - if not rp: - key.setpublish(None, **kwargs) - key.setactivate(None, **kwargs) - key.setinactive(None, **kwargs) - key.setdelete(None, **kwargs) - if policy.keyttl != key.ttl: - key.setttl(policy.keyttl) - continue - - # otherwise, ensure all dates are set correctly based on - # the initial key - a = prev.inactive() - p = a - prepub - key.setactivate(a, **kwargs) - key.setpublish(p, **kwargs) - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - prev.setdelete(a + postpub, **kwargs) - if policy.keyttl != key.ttl: - key.setttl(policy.keyttl) - prev = key - - # if we haven't got sufficient coverage, create successor key(s) - while rp and prev.inactive() and \ - prev.inactive() < now + policy.coverage: - # commit changes to predecessor: a successor can only be - # generated if Inactive has been set in the predecessor key - prev.commit(self._context['settime_path'], **kwargs) - key = prev.generate_successor(self._context['keygen_path'], - self._context['randomdev'], - prepub, **kwargs) - - key.setinactive(key.activate() + rp, **kwargs) - key.setdelete(key.inactive() + postpub, **kwargs) - keys.append(key) - prev = key - - # last key? we already know we have sufficient coverage now, so - # disable the inactivation of the final key (if it was set), - # ensuring that if dnssec-keymgr isn't run again, the last key - # in the series will at least remain usable. - prev.setinactive(None, **kwargs) - prev.setdelete(None, **kwargs) - - # commit changes - for key in keys: - key.commit(self._context['settime_path'], **kwargs) - - - def enforce_policy(self, policies, now=time.time(), **kwargs): - # If zones is provided as a parameter, use that list. - # If not, use what we have in this object - zones = kwargs.get('zones', self._zones) - keys_dir = kwargs.get('dir', self._context.get('keys_path', None)) - force = kwargs.get('force', False) - - for zone in zones: - collections = [] - policy = policies.policy(zone) - keys_dir = keys_dir or policy.directory or '.' - alg = policy.algorithm - algnum = dnskey.algnum(alg) - if 'ksk' not in kwargs or not kwargs['ksk']: - if len(self._Z[zone][algnum]) == 0: - k = dnskey.generate(self._context['keygen_path'], - self._context['randomdev'], - keys_dir, zone, alg, - policy.zsk_keysize, False, - policy.keyttl or 3600, - **kwargs) - self._Z[zone][algnum].append(k) - collections.append(self._Z[zone]) - - if 'zsk' not in kwargs or not kwargs['zsk']: - if len(self._K[zone][algnum]) == 0: - k = dnskey.generate(self._context['keygen_path'], - self._context['randomdev'], - keys_dir, zone, alg, - policy.ksk_keysize, True, - policy.keyttl or 3600, - **kwargs) - self._K[zone][algnum].append(k) - collections.append(self._K[zone]) - - for collection in collections: - for algorithm, keys in collection.items(): - if algorithm != algnum: - continue - try: - self.fixseries(keys, policy, now, **kwargs) - except Exception as e: - raise Exception('%s/%s: %s' % - (zone, dnskey.algstr(algnum), str(e))) diff --git a/bin/python/isc/keyzone.py.in b/bin/python/isc/keyzone.py.in deleted file mode 100644 index bc8c51d72fb..00000000000 --- a/bin/python/isc/keyzone.py.in +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import os -import sys -import re -from subprocess import Popen, PIPE - -######################################################################## -# Exceptions -######################################################################## -class KeyZoneException(Exception): - pass - -######################################################################## -# class keyzone -######################################################################## -class keyzone: - """reads a zone file to find data relevant to keys""" - - def __init__(self, name, filename, czpath): - self.maxttl = None - self.keyttl = None - - if not name: - return - - if not czpath or not os.path.isfile(czpath) \ - or not os.access(czpath, os.X_OK): - raise KeyZoneException('"named-compilezone" not found') - return - - maxttl = keyttl = None - - fp, _ = Popen([czpath, "-o", "-", name, filename], - stdout=PIPE, stderr=PIPE).communicate() - for line in fp.splitlines(): - if type(line) is not str: - line = line.decode('ascii') - if re.search('^[:space:]*;', line): - continue - fields = line.split() - if not maxttl or int(fields[1]) > maxttl: - maxttl = int(fields[1]) - if fields[3] == "DNSKEY": - keyttl = int(fields[1]) - - self.keyttl = keyttl - self.maxttl = maxttl diff --git a/bin/python/isc/policy.py.in b/bin/python/isc/policy.py.in deleted file mode 100644 index f2f0354267e..00000000000 --- a/bin/python/isc/policy.py.in +++ /dev/null @@ -1,692 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import re -import ply.lex as lex -import ply.yacc as yacc -from string import * -from copy import copy - - -############################################################################ -# PolicyLex: a lexer for the policy file syntax. -############################################################################ -class PolicyLex: - reserved = ('POLICY', - 'ALGORITHM_POLICY', - 'ZONE', - 'ALGORITHM', - 'DIRECTORY', - 'KEYTTL', - 'KEY_SIZE', - 'ROLL_PERIOD', - 'PRE_PUBLISH', - 'POST_PUBLISH', - 'COVERAGE', - 'STANDBY', - 'NONE') - - tokens = reserved + ('DATESUFFIX', - 'KEYTYPE', - 'ALGNAME', - 'STR', - 'QSTRING', - 'NUMBER', - 'LBRACE', - 'RBRACE', - 'SEMI') - reserved_map = {} - - t_ignore = ' \t' - t_ignore_olcomment = r'(//|\#).*' - - t_LBRACE = r'\{' - t_RBRACE = r'\}' - t_SEMI = r';'; - - def t_newline(self, t): - r'\n+' - t.lexer.lineno += t.value.count("\n") - - def t_comment(self, t): - r'/\*(.|\n)*?\*/' - t.lexer.lineno += t.value.count('\n') - - def t_DATESUFFIX(self, t): - r'(?i)(?<=[0-9 \t])(y(?:ears|ear|ea|e)?|mo(?:nths|nth|nt|n)?|w(?:eeks|eek|ee|e)?|d(?:ays|ay|a)?|h(?:ours|our|ou|o)?|mi(?:nutes|nute|nut|nu|n)?|s(?:econds|econd|econ|eco|ec|e)?)\b' - t.value = re.match(r'(?i)(y|mo|w|d|h|mi|s)([a-z]*)', t.value).group(1).lower() - return t - - def t_KEYTYPE(self, t): - r'(?i)\b(KSK|ZSK)\b' - t.value = t.value.upper() - return t - - def t_ALGNAME(self, t): - r'(?i)\b(DH|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECDSAP256SHA256|ECDSAP384SHA384|ED25519|ED448)\b' - t.value = t.value.upper() - return t - - def t_STR(self, t): - r'[A-Za-z._-][\w._-]*' - t.type = self.reserved_map.get(t.value, "STR") - return t - - def t_QSTRING(self, t): - r'"([^"\n]|(\\"))*"' - t.type = self.reserved_map.get(t.value, "QSTRING") - t.value = t.value[1:-1] - return t - - def t_NUMBER(self, t): - r'\d+' - t.value = int(t.value) - return t - - def t_error(self, t): - print("Illegal character '%s'" % t.value[0]) - t.lexer.skip(1) - - def __init__(self, **kwargs): - if 'maketrans' in dir(str): - trans = str.maketrans('_', '-') - else: - trans = maketrans('_', '-') - for r in self.reserved: - self.reserved_map[r.lower().translate(trans)] = r - self.lexer = lex.lex(object=self, **kwargs) - - def test(self, text): - self.lexer.input(text) - while True: - t = self.lexer.token() - if not t: - break - print(t) - -############################################################################ -# Policy: this object holds a set of DNSSEC policy settings. -############################################################################ -class Policy: - is_zone = False - is_alg = False - is_constructed = False - ksk_rollperiod = None - zsk_rollperiod = None - ksk_prepublish = None - zsk_prepublish = None - ksk_postpublish = None - zsk_postpublish = None - ksk_keysize = None - zsk_keysize = None - ksk_standby = None - zsk_standby = None - keyttl = None - coverage = None - directory = None - valid_key_sz_per_algo = {'RSASHA1': [1024, 4096], - 'NSEC3RSASHA1': [512, 4096], - 'RSASHA256': [1024, 4096], - 'RSASHA512': [1024, 4096], - 'ECDSAP256SHA256': None, - 'ECDSAP384SHA384': None, - 'ED25519': None, - 'ED448': None} - - def __init__(self, name=None, algorithm=None, parent=None): - self.name = name - self.algorithm = algorithm - self.parent = parent - pass - - def __repr__(self): - return ("%spolicy %s:\n" - "\tinherits %s\n" - "\tdirectory %s\n" - "\talgorithm %s\n" - "\tcoverage %s\n" - "\tksk_keysize %s\n" - "\tzsk_keysize %s\n" - "\tksk_rollperiod %s\n" - "\tzsk_rollperiod %s\n" - "\tksk_prepublish %s\n" - "\tksk_postpublish %s\n" - "\tzsk_prepublish %s\n" - "\tzsk_postpublish %s\n" - "\tksk_standby %s\n" - "\tzsk_standby %s\n" - "\tkeyttl %s\n" - % - ((self.is_constructed and 'constructed ' or \ - self.is_zone and 'zone ' or \ - self.is_alg and 'algorithm ' or ''), - self.name or 'UNKNOWN', - self.parent and self.parent.name or 'None', - self.directory and ('"' + str(self.directory) + '"') or 'None', - self.algorithm or 'None', - self.coverage and str(self.coverage) or 'None', - self.ksk_keysize and str(self.ksk_keysize) or 'None', - self.zsk_keysize and str(self.zsk_keysize) or 'None', - self.ksk_rollperiod and str(self.ksk_rollperiod) or 'None', - self.zsk_rollperiod and str(self.zsk_rollperiod) or 'None', - self.ksk_prepublish and str(self.ksk_prepublish) or 'None', - self.ksk_postpublish and str(self.ksk_postpublish) or 'None', - self.zsk_prepublish and str(self.zsk_prepublish) or 'None', - self.zsk_postpublish and str(self.zsk_postpublish) or 'None', - self.ksk_standby and str(self.ksk_standby) or 'None', - self.zsk_standby and str(self.zsk_standby) or 'None', - self.keyttl and str(self.keyttl) or 'None')) - - def __verify_size(self, key_size, size_range): - return (size_range[0] <= key_size <= size_range[1]) - - def get_name(self): - return self.name - - def constructed(self): - return self.is_constructed - - def validate(self): - """ Check if the values in the policy make sense - :return: True/False if the policy passes validation - """ - if self.ksk_rollperiod and \ - self.ksk_prepublish is not None and \ - self.ksk_prepublish > self.ksk_rollperiod: - print(self.ksk_rollperiod) - return (False, - ('KSK pre-publish period (%d) exceeds rollover period %d' - % (self.ksk_prepublish, self.ksk_rollperiod))) - - if self.ksk_rollperiod and \ - self.ksk_postpublish is not None and \ - self.ksk_postpublish > self.ksk_rollperiod: - return (False, - ('KSK post-publish period (%d) exceeds rollover period %d' - % (self.ksk_postpublish, self.ksk_rollperiod))) - - if self.zsk_rollperiod and \ - self.zsk_prepublish is not None and \ - self.zsk_prepublish >= self.zsk_rollperiod: - return (False, - ('ZSK pre-publish period (%d) exceeds rollover period %d' - % (self.zsk_prepublish, self.zsk_rollperiod))) - - if self.zsk_rollperiod and \ - self.zsk_postpublish is not None and \ - self.zsk_postpublish >= self.zsk_rollperiod: - return (False, - ('ZSK post-publish period (%d) exceeds rollover period %d' - % (self.zsk_postpublish, self.zsk_rollperiod))) - - if self.ksk_rollperiod and \ - self.ksk_prepublish and self.ksk_postpublish and \ - self.ksk_prepublish + self.ksk_postpublish >= self.ksk_rollperiod: - return (False, - (('KSK pre/post-publish periods (%d/%d) ' + - 'combined exceed rollover period %d') % - (self.ksk_prepublish, - self.ksk_postpublish, - self.ksk_rollperiod))) - - if self.zsk_rollperiod and \ - self.zsk_prepublish and self.zsk_postpublish and \ - self.zsk_prepublish + self.zsk_postpublish >= self.zsk_rollperiod: - return (False, - (('ZSK pre/post-publish periods (%d/%d) ' + - 'combined exceed rollover period %d') % - (self.zsk_prepublish, - self.zsk_postpublish, - self.zsk_rollperiod))) - - if self.algorithm is not None: - # Validate the key size - key_sz_range = self.valid_key_sz_per_algo.get(self.algorithm) - if key_sz_range is not None: - # Verify KSK - if not self.__verify_size(self.ksk_keysize, key_sz_range): - return False, 'KSK key size %d outside valid range %s' \ - % (self.ksk_keysize, key_sz_range) - - # Verify ZSK - if not self.__verify_size(self.zsk_keysize, key_sz_range): - return False, 'ZSK key size %d outside valid range %s' \ - % (self.zsk_keysize, key_sz_range) - - if self.algorithm in ['ECDSAP256SHA256', \ - 'ECDSAP384SHA384', \ - 'ED25519', \ - 'ED448']: - self.ksk_keysize = None - self.zsk_keysize = None - - return True, '' - -############################################################################ -# dnssec_policy: -# This class reads a dnssec.policy file and creates a dictionary of -# DNSSEC policy rules from which a policy for a specific zone can -# be generated. -############################################################################ -class PolicyException(Exception): - pass - -class dnssec_policy: - alg_policy = {} - named_policy = {} - zone_policy = {} - current = None - filename = None - initial = True - - def __init__(self, filename=None, **kwargs): - self.plex = PolicyLex() - self.tokens = self.plex.tokens - if 'debug' not in kwargs: - kwargs['debug'] = False - if 'write_tables' not in kwargs: - kwargs['write_tables'] = False - self.parser = yacc.yacc(module=self, **kwargs) - - # set defaults - self.setup('''policy global { algorithm rsasha256; - key-size ksk 2048; - key-size zsk 2048; - roll-period ksk 0; - roll-period zsk 1y; - pre-publish ksk 1mo; - pre-publish zsk 1mo; - post-publish ksk 1mo; - post-publish zsk 1mo; - standby ksk 0; - standby zsk 0; - keyttl 1h; - coverage 6mo; }; - policy default { policy global; };''') - - p = Policy() - p.algorithm = None - p.is_alg = True - p.ksk_keysize = 2048; - p.zsk_keysize = 2048; - - # set default algorithm policies - - # these can use default settings - self.alg_policy['RSASHA1'] = copy(p) - self.alg_policy['RSASHA1'].algorithm = "RSASHA1" - self.alg_policy['RSASHA1'].name = "RSASHA1" - - self.alg_policy['NSEC3RSASHA1'] = copy(p) - self.alg_policy['NSEC3RSASHA1'].algorithm = "NSEC3RSASHA1" - self.alg_policy['NSEC3RSASHA1'].name = "NSEC3RSASHA1" - - self.alg_policy['RSASHA256'] = copy(p) - self.alg_policy['RSASHA256'].algorithm = "RSASHA256" - self.alg_policy['RSASHA256'].name = "RSASHA256" - - self.alg_policy['RSASHA512'] = copy(p) - self.alg_policy['RSASHA512'].algorithm = "RSASHA512" - self.alg_policy['RSASHA512'].name = "RSASHA512" - - self.alg_policy['ECDSAP256SHA256'] = copy(p) - self.alg_policy['ECDSAP256SHA256'].algorithm = "ECDSAP256SHA256" - self.alg_policy['ECDSAP256SHA256'].name = "ECDSAP256SHA256" - self.alg_policy['ECDSAP256SHA256'].ksk_keysize = None; - self.alg_policy['ECDSAP256SHA256'].zsk_keysize = None; - - self.alg_policy['ECDSAP384SHA384'] = copy(p) - self.alg_policy['ECDSAP384SHA384'].algorithm = "ECDSAP384SHA384" - self.alg_policy['ECDSAP384SHA384'].name = "ECDSAP384SHA384" - self.alg_policy['ECDSAP384SHA384'].ksk_keysize = None; - self.alg_policy['ECDSAP384SHA384'].zsk_keysize = None; - - self.alg_policy['ED25519'] = copy(p) - self.alg_policy['ED25519'].algorithm = "ED25519" - self.alg_policy['ED25519'].name = "ED25519" - self.alg_policy['ED25519'].ksk_keysize = None; - self.alg_policy['ED25519'].zsk_keysize = None; - - self.alg_policy['ED448'] = copy(p) - self.alg_policy['ED448'].algorithm = "ED448" - self.alg_policy['ED448'].name = "ED448" - self.alg_policy['ED448'].ksk_keysize = None; - self.alg_policy['ED448'].zsk_keysize = None; - - if filename: - self.load(filename) - - def load(self, filename): - self.filename = filename - self.initial = True - with open(filename) as f: - text = f.read() - self.plex.lexer.lineno = 0 - self.parser.parse(text) - - self.filename = None - - def setup(self, text): - self.initial = True - self.plex.lexer.lineno = 0 - self.parser.parse(text) - - def policy(self, zone, **kwargs): - z = zone.lower() - p = None - - if z in self.zone_policy: - p = self.zone_policy[z] - - if p is None: - p = copy(self.named_policy['default']) - p.name = zone - p.is_constructed = True - - if p.algorithm is None: - parent = p.parent or self.named_policy['default'] - while parent and not parent.algorithm: - parent = parent.parent - p.algorithm = parent and parent.algorithm or None - - if p.algorithm in self.alg_policy: - ap = self.alg_policy[p.algorithm] - else: - raise PolicyException('algorithm not found') - - if p.directory is None: - parent = p.parent or self.named_policy['default'] - while parent is not None and not parent.directory: - parent = parent.parent - p.directory = parent and parent.directory - - if p.coverage is None: - parent = p.parent or self.named_policy['default'] - while parent and not parent.coverage: - parent = parent.parent - p.coverage = parent and parent.coverage or ap.coverage - - if p.ksk_keysize is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_keysize: - parent = parent.parent - p.ksk_keysize = parent and parent.ksk_keysize or ap.ksk_keysize - - if p.zsk_keysize is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_keysize: - parent = parent.parent - p.zsk_keysize = parent and parent.zsk_keysize or ap.zsk_keysize - - if p.ksk_rollperiod is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_rollperiod: - parent = parent.parent - p.ksk_rollperiod = parent and \ - parent.ksk_rollperiod or ap.ksk_rollperiod - - if p.zsk_rollperiod is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_rollperiod: - parent = parent.parent - p.zsk_rollperiod = parent and \ - parent.zsk_rollperiod or ap.zsk_rollperiod - - if p.ksk_prepublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_prepublish: - parent = parent.parent - p.ksk_prepublish = parent and \ - parent.ksk_prepublish or ap.ksk_prepublish - - if p.zsk_prepublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_prepublish: - parent = parent.parent - p.zsk_prepublish = parent and \ - parent.zsk_prepublish or ap.zsk_prepublish - - if p.ksk_postpublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_postpublish: - parent = parent.parent - p.ksk_postpublish = parent and \ - parent.ksk_postpublish or ap.ksk_postpublish - - if p.zsk_postpublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_postpublish: - parent = parent.parent - p.zsk_postpublish = parent and \ - parent.zsk_postpublish or ap.zsk_postpublish - - if p.keyttl is None: - parent = p.parent or self.named_policy['default'] - while parent is not None and not parent.keyttl: - parent = parent.parent - p.keyttl = parent and parent.keyttl - - if 'novalidate' not in kwargs or not kwargs['novalidate']: - (valid, msg) = p.validate() - if not valid: - raise PolicyException(msg) - return None - - return p - - - def p_policylist(self, p): - '''policylist : init policy - | policylist policy''' - pass - - def p_init(self, p): - "init :" - self.initial = False - - def p_policy(self, p): - '''policy : alg_policy - | zone_policy - | named_policy''' - pass - - def p_name(self, p): - '''name : STR - | KEYTYPE - | DATESUFFIX''' - p[0] = p[1] - pass - - def p_domain(self, p): - '''domain : STR - | QSTRING - | KEYTYPE - | DATESUFFIX''' - p[0] = p[1].strip() - if not re.match(r'^[\w.-][\w.-]*$', p[0]): - raise PolicyException('invalid domain') - pass - - def p_new_policy(self, p): - "new_policy :" - self.current = Policy() - - def p_alg_policy(self, p): - "alg_policy : ALGORITHM_POLICY ALGNAME new_policy alg_option_group SEMI" - self.current.name = p[2] - self.current.is_alg = True - self.alg_policy[p[2]] = self.current - pass - - def p_zone_policy(self, p): - "zone_policy : ZONE domain new_policy policy_option_group SEMI" - self.current.name = p[2].rstrip('.') - self.current.is_zone = True - self.zone_policy[p[2].rstrip('.').lower()] = self.current - pass - - def p_named_policy(self, p): - "named_policy : POLICY name new_policy policy_option_group SEMI" - self.current.name = p[2] - self.named_policy[p[2].lower()] = self.current - pass - - def p_duration_1(self, p): - "duration : NUMBER" - p[0] = p[1] - pass - - def p_duration_2(self, p): - "duration : NONE" - p[0] = None - pass - - def p_duration_3(self, p): - "duration : NUMBER DATESUFFIX" - if p[2] == "y": - p[0] = p[1] * 31536000 # year - elif p[2] == "mo": - p[0] = p[1] * 2592000 # month - elif p[2] == "w": - p[0] = p[1] * 604800 # week - elif p[2] == "d": - p[0] = p[1] * 86400 # day - elif p[2] == "h": - p[0] = p[1] * 3600 # hour - elif p[2] == "mi": - p[0] = p[1] * 60 # minute - elif p[2] == "s": - p[0] = p[1] # second - else: - raise PolicyException('invalid duration') - - def p_policy_option_group(self, p): - "policy_option_group : LBRACE policy_option_list RBRACE" - pass - - def p_policy_option_list(self, p): - '''policy_option_list : policy_option SEMI - | policy_option_list policy_option SEMI''' - pass - - def p_policy_option(self, p): - '''policy_option : parent_option - | directory_option - | coverage_option - | rollperiod_option - | prepublish_option - | postpublish_option - | keysize_option - | algorithm_option - | keyttl_option - | standby_option''' - pass - - def p_alg_option_group(self, p): - "alg_option_group : LBRACE alg_option_list RBRACE" - pass - - def p_alg_option_list(self, p): - '''alg_option_list : alg_option SEMI - | alg_option_list alg_option SEMI''' - pass - - def p_alg_option(self, p): - '''alg_option : coverage_option - | rollperiod_option - | prepublish_option - | postpublish_option - | keyttl_option - | keysize_option - | standby_option''' - pass - - def p_parent_option(self, p): - "parent_option : POLICY name" - self.current.parent = self.named_policy[p[2].lower()] - - def p_directory_option(self, p): - "directory_option : DIRECTORY QSTRING" - self.current.directory = p[2] - - def p_coverage_option(self, p): - "coverage_option : COVERAGE duration" - self.current.coverage = p[2] - - def p_rollperiod_option(self, p): - "rollperiod_option : ROLL_PERIOD KEYTYPE duration" - if p[2] == "KSK": - self.current.ksk_rollperiod = p[3] - else: - self.current.zsk_rollperiod = p[3] - - def p_prepublish_option(self, p): - "prepublish_option : PRE_PUBLISH KEYTYPE duration" - if p[2] == "KSK": - self.current.ksk_prepublish = p[3] - else: - self.current.zsk_prepublish = p[3] - - def p_postpublish_option(self, p): - "postpublish_option : POST_PUBLISH KEYTYPE duration" - if p[2] == "KSK": - self.current.ksk_postpublish = p[3] - else: - self.current.zsk_postpublish = p[3] - - def p_keysize_option(self, p): - "keysize_option : KEY_SIZE KEYTYPE NUMBER" - if p[2] == "KSK": - self.current.ksk_keysize = p[3] - else: - self.current.zsk_keysize = p[3] - - def p_standby_option(self, p): - "standby_option : STANDBY KEYTYPE NUMBER" - if p[2] == "KSK": - self.current.ksk_standby = p[3] - else: - self.current.zsk_standby = p[3] - - def p_keyttl_option(self, p): - "keyttl_option : KEYTTL duration" - self.current.keyttl = p[2] - - def p_algorithm_option(self, p): - "algorithm_option : ALGORITHM ALGNAME" - self.current.algorithm = p[2] - - def p_error(self, p): - if p: - print("%s%s%d:syntax error near '%s'" % - (self.filename or "", ":" if self.filename else "", - p.lineno, p.value)) - else: - if not self.initial: - raise PolicyException("%s%s%d:unexpected end of input" % - (self.filename or "", ":" if self.filename else "", - p and p.lineno or 0)) - -if __name__ == "__main__": - import sys - if sys.argv[1] == "lex": - file = open(sys.argv[2]) - text = file.read() - file.close() - plex = PolicyLex(debug=1) - plex.test(text) - elif sys.argv[1] == "parse": - try: - pp = dnssec_policy(sys.argv[2], write_tables=True, debug=True) - print(pp.named_policy['default']) - print(pp.policy("nonexistent.zone")) - except Exception as e: - print(e.args[0]) diff --git a/bin/python/isc/rndc.py.in b/bin/python/isc/rndc.py.in deleted file mode 100644 index e1a3e77761d..00000000000 --- a/bin/python/isc/rndc.py.in +++ /dev/null @@ -1,188 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -############################################################################ -# rndc.py -# This module implements the RNDC control protocol. -############################################################################ - -from collections import OrderedDict -import time -import struct -import hashlib -import hmac -import base64 -import random -import socket - - -class rndc(object): - """RNDC protocol client library""" - __algos = {'md5': 157, - 'sha1': 161, - 'sha224': 162, - 'sha256': 163, - 'sha384': 164, - 'sha512': 165} - - def __init__(self, host, algo, secret): - """Creates a persistent connection to RNDC and logs in - host - (ip, port) tuple - algo - HMAC algorithm: one of md5, sha1, sha224, sha256, sha384, sha512 - (with optional prefix 'hmac-') - secret - HMAC secret, base64 encoded""" - self.host = host - algo = algo.lower() - if algo.startswith('hmac-'): - algo = algo[5:] - self.algo = algo - self.hlalgo = getattr(hashlib, algo) - self.secret = base64.b64decode(secret) - self.ser = random.randint(0, 1 << 24) - self.nonce = None - self.__connect_login() - - def call(self, cmd): - """Call a RNDC command, all parsing is done on the server side - cmd - a complete string with a command (eg 'reload zone example.com') - """ - return dict(self.__command(type=cmd)['_data']) - - def __serialize_dict(self, data, ignore_auth=False): - rv = bytearray() - for k, v in data.items(): - if ignore_auth and k == '_auth': - continue - rv += struct.pack('B', len(k)) + k.encode('ascii') - if type(v) == str: - rv += struct.pack('>BI', 1, len(v)) + v.encode('ascii') - elif type(v) == bytes: - rv += struct.pack('>BI', 1, len(v)) + v - elif type(v) == bytearray: - rv += struct.pack('>BI', 1, len(v)) + v - elif type(v) == OrderedDict: - sd = self.__serialize_dict(v) - rv += struct.pack('>BI', 2, len(sd)) + sd - else: - raise NotImplementedError('Cannot serialize element of type %s' - % type(v)) - return rv - - def __prep_message(self, *args, **kwargs): - self.ser += 1 - now = int(time.time()) - data = OrderedDict(*args, **kwargs) - - d = OrderedDict() - d['_auth'] = OrderedDict() - d['_ctrl'] = OrderedDict() - d['_ctrl']['_ser'] = str(self.ser) - d['_ctrl']['_tim'] = str(now) - d['_ctrl']['_exp'] = str(now+60) - if self.nonce is not None: - d['_ctrl']['_nonce'] = self.nonce - d['_data'] = data - - msg = self.__serialize_dict(d, ignore_auth=True) - hash = hmac.new(self.secret, msg, self.hlalgo).digest() - bhash = base64.b64encode(hash) - if self.algo == 'md5': - d['_auth']['hmd5'] = struct.pack('22s', bhash) - else: - d['_auth']['hsha'] = bytearray(struct.pack('B88s', - self.__algos[self.algo], bhash)) - msg = self.__serialize_dict(d) - msg = struct.pack('>II', len(msg) + 4, 1) + msg - return msg - - def __verify_msg(self, msg): - if self.nonce is not None and msg['_ctrl']['_nonce'] != self.nonce: - return False - if self.algo == 'md5': - bhash = msg['_auth']['hmd5'] - else: - bhash = msg['_auth']['hsha'][1:] - if type(bhash) == bytes: - bhash = bhash.decode('ascii') - bhash += '=' * (4 - (len(bhash) % 4)) - remote_hash = base64.b64decode(bhash) - my_msg = self.__serialize_dict(msg, ignore_auth=True) - my_hash = hmac.new(self.secret, my_msg, self.hlalgo).digest() - return (my_hash == remote_hash) - - def __command(self, *args, **kwargs): - msg = self.__prep_message(*args, **kwargs) - sent = self.socket.send(msg) - if sent != len(msg): - raise IOError("Cannot send the message") - - header = self.socket.recv(8) - if len(header) != 8: - # What should we throw here? Bad auth can cause this... - raise IOError("Can't read response header") - - length, version = struct.unpack('>II', header) - if version != 1: - raise NotImplementedError('Wrong message version %d' % version) - - # it includes the header - length -= 4 - data = self.socket.recv(length, socket.MSG_WAITALL) - if len(data) != length: - raise IOError("Can't read response data") - - if type(data) == str: - data = bytearray(data) - msg = self.__parse_message(data) - if not self.__verify_msg(msg): - raise IOError("Authentication failure") - - return msg - - def __connect_login(self): - self.socket = socket.create_connection(self.host) - self.nonce = None - msg = self.__command(type='null') - self.nonce = msg['_ctrl']['_nonce'] - - def __parse_element(self, input): - pos = 0 - labellen = input[pos] - pos += 1 - label = input[pos:pos+labellen].decode('ascii') - pos += labellen - type = input[pos] - pos += 1 - datalen = struct.unpack('>I', input[pos:pos+4])[0] - pos += 4 - data = input[pos:pos+datalen] - pos += datalen - rest = input[pos:] - - if type == 1: # raw binary value - return label, data, rest - elif type == 2: # dictionary - d = OrderedDict() - while len(data) > 0: - ilabel, value, data = self.__parse_element(data) - d[ilabel] = value - return label, d, rest - # TODO type 3 - list - else: - raise NotImplementedError('Unknown element type %d' % type) - - def __parse_message(self, input): - rv = OrderedDict() - hdata = None - while len(input) > 0: - label, value, input = self.__parse_element(input) - rv[label] = value - return rv diff --git a/bin/python/isc/tests/.gitignore b/bin/python/isc/tests/.gitignore deleted file mode 100644 index c38ff90a33c..00000000000 --- a/bin/python/isc/tests/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dnskey_test.py -policy_test.py diff --git a/bin/python/isc/tests/Makefile.in b/bin/python/isc/tests/Makefile.in deleted file mode 100644 index 60b9bd77c8e..00000000000 --- a/bin/python/isc/tests/Makefile.in +++ /dev/null @@ -1,31 +0,0 @@ -# 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. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -PYTHON = @PYTHON@ - -PYTESTS = dnskey_test.py policy_test.py - -@BIND9_MAKE_RULES@ - -check test: - for test in $(PYTESTS); do \ - PYTHONPATH=${srcdir}/../.. $(PYTHON) ${srcdir}/$$test; \ - done - -clean distclean:: - rm -rf *.pyc __pycache__ - -distclean:: - rm -f ${PYTESTS} diff --git a/bin/python/isc/tests/dnskey_test.py.in b/bin/python/isc/tests/dnskey_test.py.in deleted file mode 100644 index 91d52452a00..00000000000 --- a/bin/python/isc/tests/dnskey_test.py.in +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import sys -import unittest -sys.path.append('../..') -from isc import * - -kdict = None - - -def getkey(): - global kdict - if not kdict: - kd = keydict(path='testdata') - for key in kd: - return key - - -class DnskeyTest(unittest.TestCase): - def test_metdata(self): - key = getkey() - self.assertEqual(key.created(), 1448055647) - self.assertEqual(key.publish(), 1445463714) - self.assertEqual(key.activate(), 1448055714) - self.assertEqual(key.revoke(), 1479591714) - self.assertEqual(key.inactive(), 1511127714) - self.assertEqual(key.delete(), 1542663714) - self.assertEqual(key.syncpublish(), 1442871714) - self.assertEqual(key.syncdelete(), 1448919714) - - def test_fmttime(self): - key = getkey() - self.assertEqual(key.getfmttime('Created'), '20151120214047') - self.assertEqual(key.getfmttime('Publish'), '20151021214154') - self.assertEqual(key.getfmttime('Activate'), '20151120214154') - self.assertEqual(key.getfmttime('Revoke'), '20161119214154') - self.assertEqual(key.getfmttime('Inactive'), '20171119214154') - self.assertEqual(key.getfmttime('Delete'), '20181119214154') - self.assertEqual(key.getfmttime('SyncPublish'), '20150921214154') - self.assertEqual(key.getfmttime('SyncDelete'), '20151130214154') - -if __name__ == "__main__": - unittest.main() diff --git a/bin/python/isc/tests/policy_test.py.in b/bin/python/isc/tests/policy_test.py.in deleted file mode 100644 index 51d008d0572..00000000000 --- a/bin/python/isc/tests/policy_test.py.in +++ /dev/null @@ -1,83 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import sys -import unittest -sys.path.append('../..') -from isc import * - - -class PolicyTest(unittest.TestCase): - def test_keysize(self): - pol = policy.dnssec_policy() - pol.load('test-policies/01-keysize.pol') - - p = pol.policy('good_rsa.test', novalidate=True) - self.assertEqual(p.get_name(), "good_rsa.test") - self.assertEqual(p.constructed(), False) - self.assertEqual(p.validate(), (True, "")) - - def test_prepublish(self): - pol = policy.dnssec_policy() - pol.load('test-policies/02-prepublish.pol') - p = pol.policy('good_prepublish.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - - p = pol.policy('bad_prepublish.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'KSK pre/post-publish periods ' - '(10368000/5184000) combined exceed ' - 'rollover period 10368000')) - - def test_postpublish(self): - pol = policy.dnssec_policy() - pol.load('test-policies/03-postpublish.pol') - - p = pol.policy('good_postpublish.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - - p = pol.policy('bad_postpublish.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'KSK pre/post-publish periods ' - '(10368000/5184000) combined exceed ' - 'rollover period 10368000')) - - def test_combined_pre_post(self): - pol = policy.dnssec_policy() - pol.load('test-policies/04-combined-pre-post.pol') - - p = pol.policy('good_combined_pre_post_ksk.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - - p = pol.policy('bad_combined_pre_post_ksk.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'KSK pre/post-publish periods ' - '(5184000/5184000) combined exceed ' - 'rollover period 10368000')) - - p = pol.policy('good_combined_pre_post_zsk.test', novalidate=True) - self.assertEqual(p.validate(), - (True, "")) - p = pol.policy('bad_combined_pre_post_zsk.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'ZSK pre/post-publish periods ' - '(5184000/5184000) combined exceed ' - 'rollover period 7776000')) - - def test_numeric_zone(self): - pol = policy.dnssec_policy() - pol.load('test-policies/05-numeric-zone.pol') - - p = pol.policy('99example.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - -if __name__ == "__main__": - unittest.main() diff --git a/bin/python/isc/tests/test-policies/01-keysize.pol b/bin/python/isc/tests/test-policies/01-keysize.pol deleted file mode 100644 index 8b62c5fd44f..00000000000 --- a/bin/python/isc/tests/test-policies/01-keysize.pol +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -policy keysize_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -policy keysize_dsa { - algorithm dsa; - coverage 1y; - key-size ksk 2048; - key-size zsk 1024; -}; - -zone good_rsa.test { - policy keysize_rsa; -}; - -zone bad_rsa.test { - policy keysize_rsa; - key-size ksk 511; -}; - -zone good_dsa.test { - policy keysize_dsa; - key-size ksk 1024; - key-size zsk 768; -}; - -zone bad_dsa.test { - policy keysize_dsa; - key-size ksk 1024; - key-size zsk 769; -}; diff --git a/bin/python/isc/tests/test-policies/02-prepublish.pol b/bin/python/isc/tests/test-policies/02-prepublish.pol deleted file mode 100644 index bd3538660fb..00000000000 --- a/bin/python/isc/tests/test-policies/02-prepublish.pol +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -policy prepublish_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -// Policy that defines a pre-publish period lower than the rollover period -zone good_prepublish.test { - policy prepublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 1mo; -}; - -// Policy that defines a pre-publish period equal to the rollover period -zone bad_prepublish.test { - policy prepublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 4mo; -}; - - diff --git a/bin/python/isc/tests/test-policies/03-postpublish.pol b/bin/python/isc/tests/test-policies/03-postpublish.pol deleted file mode 100644 index 4d4a8efa3ef..00000000000 --- a/bin/python/isc/tests/test-policies/03-postpublish.pol +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -policy postpublish_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -// Policy that defines a post-publish period lower than the rollover period -zone good_postpublish.test { - policy postpublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 1mo; -}; - -// Policy that defines a post-publish period equal to the rollover period -zone bad_postpublish.test { - policy postpublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 4mo; -}; - - diff --git a/bin/python/isc/tests/test-policies/04-combined-pre-post.pol b/bin/python/isc/tests/test-policies/04-combined-pre-post.pol deleted file mode 100644 index d612d816f45..00000000000 --- a/bin/python/isc/tests/test-policies/04-combined-pre-post.pol +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ - -policy combined_pre_post_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -// Policy that defines a combined pre-publish and post-publish period lower -// than the rollover period -zone good_combined_pre_post_ksk.test { - policy combined_pre_post_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 1mo; - post-publish ksk 1mo; -}; - -// Policy that defines a combined pre-publish and post-publish period higher -// than the rollover period -zone bad_combined_pre_post_ksk.test { - policy combined_pre_post_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 2mo; - post-publish ksk 2mo; -}; - -// Policy that defines a combined pre-publish and post-publish period lower -// than the rollover period -zone good_combined_pre_post_zsk.test { - policy combined_pre_post_rsa; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 1mo; - post-publish zsk 1mo; -}; - -// Policy that defines a combined pre-publish and post-publish period higher -// than the rollover period -zone bad_combined_pre_post_zsk.test { - policy combined_pre_post_rsa; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2mo; - post-publish zsk 2mo; -}; - - diff --git a/bin/python/isc/tests/test-policies/05-numeric-zone.pol b/bin/python/isc/tests/test-policies/05-numeric-zone.pol deleted file mode 100644 index 1db8c08a1b8..00000000000 --- a/bin/python/isc/tests/test-policies/05-numeric-zone.pol +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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. - */ - -// Zone policy that uses a numeric name -zone "99example.test" { - coverage 6mo; -}; diff --git a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.key b/bin/python/isc/tests/testdata/Kexample.com.+007+35529.key deleted file mode 100644 index c5afbe27edb..00000000000 --- a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.key +++ /dev/null @@ -1,8 +0,0 @@ -; This is a key-signing key, keyid 35529, for example.com. -; Created: 20151120214047 (Fri Nov 20 13:40:47 2015) -; Publish: 20151021214154 (Wed Oct 21 14:41:54 2015) -; Activate: 20151120214154 (Fri Nov 20 13:41:54 2015) -; Revoke: 20161119214154 (Sat Nov 19 13:41:54 2016) -; Inactive: 20171119214154 (Sun Nov 19 13:41:54 2017) -; Delete: 20181119214154 (Mon Nov 19 13:41:54 2018) -example.com. IN DNSKEY 257 3 7 AwEAAbbJK96tY8d4sF6RLxh9SVIhho5s2ZhrcijT5j1SNLECen7QLutj VJPEiG8UgBLaJSGkxPDxOygYv4hwh4JXBSj89o9rNabAJtCa9XzIXSpt /cfiCfvqmcOZb9nepmDCXsC7gn/gbae/4Y5ym9XOiCp8lu+tlFWgRiJ+ kxDGN48rRPrGfpq+SfwM9NUtftVa7B0EFVzDkADKedRj0SSGYOqH+WYH CnWjhPFmgJoAw3/m4slTHW1l+mDwFvsCMjXopg4JV0CNnTybnOmyuIwO LWRhB3q8ze24sYBU1fpE9VAMxZ++4Kqh/2MZFeDAs7iPPKSmI3wkRCW5 pkwDLO5lJ9c= diff --git a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.private b/bin/python/isc/tests/testdata/Kexample.com.+007+35529.private deleted file mode 100644 index af22c6ad523..00000000000 --- a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.private +++ /dev/null @@ -1,18 +0,0 @@ -Private-key-format: v1.3 -Algorithm: 7 (NSEC3RSASHA1) -Modulus: tskr3q1jx3iwXpEvGH1JUiGGjmzZmGtyKNPmPVI0sQJ6ftAu62NUk8SIbxSAEtolIaTE8PE7KBi/iHCHglcFKPz2j2s1psAm0Jr1fMhdKm39x+IJ++qZw5lv2d6mYMJewLuCf+Btp7/hjnKb1c6IKnyW762UVaBGIn6TEMY3jytE+sZ+mr5J/Az01S1+1VrsHQQVXMOQAMp51GPRJIZg6of5ZgcKdaOE8WaAmgDDf+biyVMdbWX6YPAW+wIyNeimDglXQI2dPJuc6bK4jA4tZGEHerzN7bixgFTV+kT1UAzFn77gqqH/YxkV4MCzuI88pKYjfCREJbmmTAMs7mUn1w== -PublicExponent: AQAB -PrivateExponent: jfiM6YU1Rd6Y5qrPsK7HP1Ko54DmNbvmzI1hfGmYYZAyQsNCXjQloix5aAW9QGdNhecrzJUhxJAMXFZC+lrKuD5a56R25JDE1Sw21nft3SHXhuQrqw5Z5hIMTWXhRrBR1lMOFnLj2PJxqCmenp+vJYjl1z20RBmbv/keE15SExFRJIJ3G0lI4V0KxprY5rgsT/vID0pS32f7rmXhgEzyWDyuxceTMidBooD5BSeEmSTYa4rvCVZ2vgnzIGSxjYDPJE2rGve2dpvdXQuujRFaf4+/FzjaOgg35rTtUmC9klfB4D6KJIfc1PNUwcH7V0VJ2fFlgZgMYi4W331QORl9sQ== -Prime1: 479rW3EeoBwHhUKDy5YeyfnMKjhaosrcYhW4resevLzatFrvS/n2KxJnsHoEzmGr2A13naI61RndgVBBOwNDWI3/tQ+aKvcr+V9m4omROV3xYa8s1FsDbEW0Z6G0UheaqRFir8WK98/Lj6Zht1uBXHSPPf91OW0qj+b5gbX7TK8= -Prime2: zXXlxgIq+Ih6kxsUw4Ith0nd/d2P3d42QYPjxYjsg4xYicPAjva9HltnbBQ2lr4JEG9Yyb8KalSnJUSuvXtn7bGfBzLu8W6omCeVWXQVH4NIu9AjpO16NpMKWGRfiHHbbSYJs1daTZKHC2FEmi18MKX/RauHGGOakFQ/3A/GMVk= -Exponent1: 0o9UQ1uHNAIWFedUEHJ/jr7LOrGVYnLpZCmu7+S0K0zzatGz8ets44+FnAyDywdUKFDzKSMm/4SFXRwE4vl2VzYZlp2RLG4PEuRYK9OCF6a6F1UsvjxTItQjIbjIDSnTjMINGnMps0lDa1EpgKsyI3eEQ46eI3TBZ//k6D6G0vM= -Exponent2: d+CYJgXRyJzo17fvT3s+0TbaHWsOq+chROyNEw4m4UIbzpW2XjO8eF/gYgERMLbEVyCAb4XVr+CgfXArfEbqhpciMHMZUyi7mbtOupiuUmqpH1v70Bj3O6xjVtuJmfTEkFSnSEppV+VsgclI26Q6V7Ai1yWTdzl2T0u4zs8tVlE= -Coefficient: E4EYw76gIChdQDn6+Uh44/xH9Uwmvq3OETR8w/kEZ0xQ8AkTdKFKUp84nlR6gN+ljb2mUxERKrVLwnBsU8EbUlo9UccMbBGkkZ/8MyfGCBb9nUyOFtOxdHY2M0MQadesRptXHt/m30XjdohwmT7qfSIENwtgUOHbwFnn7WPMc/k= -Created: 20151120214047 -Publish: 20151021214154 -Activate: 20151120214154 -Revoke: 20161119214154 -Inactive: 20171119214154 -Delete: 20181119214154 -SyncPublish: 20150921214154 -SyncDelete: 20151130214154 diff --git a/bin/python/isc/utils.py.in b/bin/python/isc/utils.py.in deleted file mode 100644 index 0241871960d..00000000000 --- a/bin/python/isc/utils.py.in +++ /dev/null @@ -1,71 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import os - -# These routines permit platform-independent location of BIND 9 tools -if os.name == 'nt': - import win32con - import win32api - - -def prefix(bindir=''): - if os.name != 'nt': - return os.path.join('@prefix@', bindir) - - hklm = win32con.HKEY_LOCAL_MACHINE - bind_subkey = "Software\\ISC\\BIND" - sam = win32con.KEY_READ - h_key = None - key_found = True - # can fail if the registry redirected for 32/64 bits - try: - h_key = win32api.RegOpenKeyEx(hklm, bind_subkey, 0, sam) - except: - key_found = False - # retry for 32 bit python with 64 bit bind9 - if not key_found: - key_found = True - sam64 = sam | win32con.KEY_WOW64_64KEY - try: - h_key = win32api.RegOpenKeyEx(hklm, bind_subkey, 0, sam64) - except: - key_found = False - # retry 64 bit python with 32 bit bind9 - if not key_found: - key_found = True - sam32 = sam | win32con.KEY_WOW64_32KEY - try: - h_key = win32api.RegOpenKeyEx(hklm, bind_subkey, 0, sam32) - except: - key_found = False - if key_found: - try: - (named_base, _) = win32api.RegQueryValueEx(h_key, "InstallDir") - except: - key_found = False - win32api.RegCloseKey(h_key) - if key_found: - return os.path.join(named_base, bindir) - return os.path.join(win32api.GetSystemDirectory(), bindir) - - -def shellquote(s): - if os.name == 'nt': - return '"' + s.replace('"', '"\\"') + '"' - return "'" + s.replace("'", "'\\''") + "'" - - -version = '@BIND9_VERSION@' -if os.name != 'nt': - sysconfdir = '@expanded_sysconfdir@' -else: - sysconfdir = prefix('etc') diff --git a/bin/python/setup.py b/bin/python/setup.py deleted file mode 100644 index c50f6d1aa3b..00000000000 --- a/bin/python/setup.py +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -from distutils.core import setup -setup(name='isc', - version='2.0', - description='Python functions to support BIND utilities', - url='https://www.isc.org/bind', - author='Internet Systems Consortium, Inc', - author_email='info@isc.org', - license='MPL', - requires=['ply'], - packages=['isc']) diff --git a/bin/tests/system/checkds/clean.sh b/bin/tests/system/checkds/clean.sh deleted file mode 100644 index e4ad79edd20..00000000000 --- a/bin/tests/system/checkds/clean.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# 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. - -rm -f checkds.* -rm -f ns*/named.lock diff --git a/bin/tests/system/checkds/dig.bat b/bin/tests/system/checkds/dig.bat deleted file mode 100755 index 9465a460259..00000000000 --- a/bin/tests/system/checkds/dig.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off -set ext= -set file= - -:loop -@set arg=%1 -if "%arg%" == "" goto end -if "%arg:~0,1%" == "+" goto next -if "%arg%" == "-t" goto next -if "%arg%" == "ds" goto ds -if "%arg%" == "DS" goto ds -if "%arg%" == "dnskey" goto dnskey -if "%arg%" == "DNSKEY" goto dnskey -set file=%arg% -goto next - -:ds -set ext=ds -goto next - -:dnskey -set ext=dnskey -goto next - -:next -shift -goto loop - -:end - -set name=%file%.%ext%.db -type %name% diff --git a/bin/tests/system/checkds/dig.pl b/bin/tests/system/checkds/dig.pl deleted file mode 100644 index 7312f024214..00000000000 --- a/bin/tests/system/checkds/dig.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/perl -# -# 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. - -my $arg; -my $ext; -my $file; - -foreach $arg (@ARGV) { - if ($arg =~ /^\+/) { - next; - } - if ($arg =~ /^-t/) { - next; - } - if ($arg =~ /^ds$/i) { - $ext = "ds"; - next; - } - if ($arg =~ /^dnskey$/i) { - $ext = "dnskey"; - next; - } - $file = $arg; - next; -} - -open F, $file . "." . $ext . ".db" || die $!; -while () { - print; -} -close F; diff --git a/bin/tests/system/checkds/dig.sh b/bin/tests/system/checkds/dig.sh deleted file mode 100755 index e6fd84e2f0c..00000000000 --- a/bin/tests/system/checkds/dig.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# 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. - -while [ "$#" != 0 ]; do - case $1 in - +*) shift ;; - -t) shift ;; - DS|ds) ext=ds ; shift ;; - DNSKEY|dnskey) ext=dnskey ; shift ;; - *) file=$1 ; shift ;; - esac -done - -cat ${file}.${ext}.db diff --git a/bin/tests/system/checkds/missing.example.dnskey.db b/bin/tests/system/checkds/missing.example.dnskey.db deleted file mode 100644 index e372130f1dc..00000000000 --- a/bin/tests/system/checkds/missing.example.dnskey.db +++ /dev/null @@ -1,3 +0,0 @@ -missing.example. 3600 IN DNSKEY 257 3 5 AwEAAc6Cz10GXEh5lxA9ujTY/QarTajcUOBwwBYIeldjRsgoouK/UioY FYgxEFL0O5JK6YCRUoGzl3EgLr5GvNyhIp1PZpOpHf7o/4MVOZTGJzm/ sHWP5B+KcYjQOxJiDb433iCmRM4DpHPUUoxw0QbZglzAzl5MfKBoyZud lH59DdT/50bkBg8iVu35EzuW0SYt31k70hxHBSb2wAGWeqxEPKJ1nQiI UcrWNDeem7byrqjPN9wyZhq0XkQ9qbcYxAkRNd8Y7P0FyR1YKJMc6SWZ Ru7muvxqTHgCtJVgxVz4qndCFKdYidiDeKe2/X/z5gf7pyYl3549O8JR tWdNKqutppk= -missing.example. 3600 IN DNSKEY 257 3 5 BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjG rhhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA +u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy 347cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQ zBkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysy LKOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/b ByBNsO70aEFTd -missing.example. 3600 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/missing.example.ds.db b/bin/tests/system/checkds/missing.example.ds.db deleted file mode 100644 index 540ec0bdcbe..00000000000 --- a/bin/tests/system/checkds/missing.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -missing.example. 3600 IN DS 12892 5 2 EF59E5C70BC4153B7DB4C11F9C36B729577DA71474E0A5C9B8875173 6E583200 -missing.example. 3600 IN DS 12892 5 1 9D4CD60491D372207FA584D2EE460CC51D7FF8A7 diff --git a/bin/tests/system/checkds/none.example.dnskey.db b/bin/tests/system/checkds/none.example.dnskey.db deleted file mode 100644 index 76ae905ffd5..00000000000 --- a/bin/tests/system/checkds/none.example.dnskey.db +++ /dev/null @@ -1,3 +0,0 @@ -none.example. 3600 IN DNSKEY 257 3 5 AwEAAc6Cz10GXEh5lxA9ujTY/QarTajcUOBwwBYIeldjRsgoouK/UioY FYgxEFL0O5JK6YCRUoGzl3EgLr5GvNyhIp1PZpOpHf7o/4MVOZTGJzm/ sHWP5B+KcYjQOxJiDb433iCmRM4DpHPUUoxw0QbZglzAzl5MfKBoyZud lH59DdT/50bkBg8iVu35EzuW0SYt31k70hxHBSb2wAGWeqxEPKJ1nQiI UcrWNDeem7byrqjPN9wyZhq0XkQ9qbcYxAkRNd8Y7P0FyR1YKJMc6SWZ Ru7muvxqTHgCtJVgxVz4qndCFKdYidiDeKe2/X/z5gf7pyYl3549O8JR tWdNKqutppk= -none.example. 3600 IN DNSKEY 257 3 5 BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjG rhhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA +u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy 347cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQ zBkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysy LKOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/b ByBNsO70aEFTd -none.example. 3600 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/none.example.ds.db b/bin/tests/system/checkds/none.example.ds.db deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/bin/tests/system/checkds/ok.example.dnskey.db b/bin/tests/system/checkds/ok.example.dnskey.db deleted file mode 100644 index c767c8fc783..00000000000 --- a/bin/tests/system/checkds/ok.example.dnskey.db +++ /dev/null @@ -1,2 +0,0 @@ -ok.example. 625 IN DNSKEY 257 3 5 BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjGr hhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA+ u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy3 47cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQz Bkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysyL KOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/bB yBNsO70aEFTd -ok.example. 625 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/ok.example.ds.db b/bin/tests/system/checkds/ok.example.ds.db deleted file mode 100644 index 96b159bc9b5..00000000000 --- a/bin/tests/system/checkds/ok.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -ok.example. 3600 IN DS 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13 -ok.example. 3600 IN DS 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390 diff --git a/bin/tests/system/checkds/prep.example.db b/bin/tests/system/checkds/prep.example.db deleted file mode 100644 index 5ba5987cabb..00000000000 --- a/bin/tests/system/checkds/prep.example.db +++ /dev/null @@ -1,121 +0,0 @@ -; File written on Thu Oct 5 23:44:34 2017 -; dnssec_signzone version 9.12.0a1 -prep.example. 300 IN SOA ns1.prep.example. hostmaster.prep.example. ( - 1 ; serial - 2000 ; refresh (33 minutes 20 seconds) - 2000 ; retry (33 minutes 20 seconds) - 1814400 ; expire (3 weeks) - 3600 ; minimum (1 hour) - ) - 300 RRSIG SOA 8 2 300 ( - 20171105054434 20171006054434 19260 prep.example. - 1fX0z7Swu4gMPews/ZE8bzNg+JXNedFBDGIH - PTSfVQtVLIvRWpME+PylX7MdVMZE/PST+x4/ - mWyveyjetEOo7/7aQL236FfI0y6TxQFy7HwC - FMieqoQCUluuKOvToxg4vUp4GOdlUGbqC63h - DbX5Z37VptJXLkt4niF4Kl2iD+U9/bk7HAEU - 4zDiKroYnusGKfVB9xAWddzoHdLxhVuPi7ut - 328suPdgX0bfs7uB+y4cikhGzAmPpNMlGHju - qYG74NcFGQNutLB7ayx/m87t7mTty7jbNKm3 - QWJSPf5IR8/kmzAi8HMnapY5vUmm+hX8JOfU - UtH7i0iEsUqRbEwu5A== ) - 300 NS ns1.prep.example. - 300 RRSIG NS 8 2 300 ( - 20171105054434 20171006054434 19260 prep.example. - u5sU2cfqNqIyCLw18ZNnFw28/GyRt0EOiPYS - dygmpfMDrvDaxjiiai8zWYjnl/E3qzVH9Zku - 07lEDORZdVb0uCDe1NynjAyw4AHps85cAwVc - 8HTSbzdVZsQTELpunYFJffh24PDr9unw7KOY - jzTP6qNedJ1uM54TOr177zfmBh7N2fkAoGyV - NjvTKrlgDYGNIn8/YMgHb4sNgyfe54MYY00f - kehVxfKnRCgDsbJ0Pk6jhBMCQWvOh8jG8WyV - ElAa/eMqlxUC1idF8ydWefjsI/7lPcjSalw9 - qZw4CDCLHHZy0TOSmCYRRZuIeVXzBfDPJyi4 - 2A3iLntKFJ4AOLFMJg== ) - 3600 NSEC ns1.prep.example. NS SOA RRSIG NSEC DNSKEY - 3600 RRSIG NSEC 8 2 3600 ( - 20171105054434 20171006054434 19260 prep.example. - Aed99/jdG82YAkKVWjoKOsAGtB3JnyKkCaAq - zgMrYkXU41y3KDCAmGzooGPQY7NN+WxX7FJ2 - 1nXkgljma/azgpsbi9ssneFtv7PPFClVmN+u - j+mM4MK/ZR7eJOsMqETg4PAO5VAh6c/GVmyA - RD/m6EhJVZEjPfLWbDoC4hVAgem7DP/NMjyI - GfztpDjMmyLQyv6tL+UEXSJHGp3ZEa5Z5i7X - Nl/bRTUlZs7L4rTgoqHv6LEmsXKAf9rZYq4b - eP6GF9I1Ry41MfHLc7lPUmtR38ErEsM5uGzw - trCQYEFhuRWUBxZ8OSL2EZK9rUBXZX+cwK/8 - ZP7mIfDfljkXPQcmow== ) - 3600 DNSKEY 256 3 8 ( - AwEAAfMzj6aZIgZDVcpH1pKOtq998E85+nEY - YJa0lLS8+QTCC1Efke8GLwsXT0IPTuwnOuXM - RjySirab0NuEr69T8KP/43YxcRdmCg89mjjN - szoVPPstC9xBKVOc0pRMDF7sfsTrSye3RY7+ - Z6uZEH5FOAkz2hNbJJHOn4HpNUhLPJGRauhf - 0evamwUmQ/mlhkVW5q4WmqPCDMNY3K6XtkEm - cvm8n9ZCXC9Z5AX6KpynujzLdKyxpdGqUk6r - lavp9ILPpRKoTZDX+2q1pDgP5cDndwtgNSvU - DBQZoD0psS2cyB3PHo+dPwwpEyM//ZSKsH9m - e85Ti0413TOWFyFd/jUOUA8= - ) ; ZSK; alg = RSASHA256 ; key id = 19260 - 3600 DNSKEY 257 3 8 ( - AwEAAbV8X06Qvk350aZ6eZ1d7WbT1H/Y0Sv7 - qAdbk5fbYIKpMvZ8D9xqoTHgD0z0uCgWWIcm - /xyKBfmax76oLwMBpR/kdtuJz0irgFITnJCH - pEfR9AJ/Mfm7NyMglq+/39I03E1/LXvpXQLG - tg+Mo/2CUE5sbG31jmPNK/2J8RMESkIi87fW - azZU/oyUEtECE5PGbdyw+4PacAsXNjnwl30T - aatL277wX4pt+IUPdE6EIph3t+dxXJ7OpHgW - 8g+YSHLlCImLVapdg3oD/cs6ncaBq9z7la5Y - dHNw2QAIAvQ11EsonrkonPqO6zNVZAVdT2VB - X5YzGAoCFUvbCvlnl2a7SxM= - ) ; KSK; alg = RSASHA256 ; key id = 65482 - 3600 RRSIG DNSKEY 8 2 3600 ( - 20171105054434 20171006054434 19260 prep.example. - pPw81pJ3PeF+tqEswTul9N8Qsl9JKgK4v8SV - lPfP0pnlMBMbtMFFkx5ZmhQg3Z3U8SdE64Bt - C5St3qItyyKdTQ0Rbm9mfV6twxDB8lVry8F7 - Pv7gJmmcWzBcbLGcrXIrVNSZhigkemQXTElj - P8y1j7kaNFWBWbDMn7KesiZ9BiC6sqvuKa3R - wSofjwXTESspWZP0NtXr5ymaBIMR9UtNj5Wh - jm1+tg6BxNBKxhCHlSC0ltPS/qq9J1ZUmtJz - sj/EAFfPVJVuEveebMvi1oDWPTgajO9+EHl4 - ELrgnQHCgaybMzbpd/A5+Tr1hQkv48I8Mb0/ - 8LJ2/6xrvJm64yRteg== ) - 3600 RRSIG DNSKEY 8 2 3600 ( - 20171105054434 20171006054434 65482 prep.example. - WeIWiC9SnBe2+UocVjpap62O8Rz+iljwJiu9 - VlGUwct3Vydq4/4FVAKdPklXV5cYbBLhO2MB - 3R4toX8RNU/0Ny8DnugQzLKvVfg0xoyU/UAJ - k4aWa/vPivSLGouLQPiNp71bdXN4LB/2xmzu - cPYXzS9ePpwCOp/9JLoNjBSMQkfjfWAcaNtj - 1DKDmHHL1sPMizninxSJLQOAKb+JwUAjAkOM - O1JqwkB12/IZuzxN5hly+uNsbFFxPzQkcnJ4 - 5bhzxuh5D/JRXW0nF5aO4aR+9X+lSUpDJQZ1 - 5fOt1cybZCn/ag68RA92zrnisdbrggJGS003 - wn/VKbLVfFj3eQrfNA== ) -ns1.prep.example. 300 IN A 1.1.1.1 - 300 RRSIG A 8 3 300 ( - 20171105054434 20171006054434 19260 prep.example. - QUyDyJVk3JGEq+VTZtY3firzsRqOA0LUm3Tf - /fnemQBeOlMda2ErA7DqYVriIGfM8jph416E - YX8SKAZXGEAlsEbC9cWBVyc5TYH6tZ43sV51 - 55kGTiUY92NnrH10Q+m2SLAEEaKCA/cgBwOR - tN2Wb1meHgiLbGYN2LbANfDQzoEk4AYAgT6r - wDKVVg/V9Ed7JnCnBQc9MN9+LQ3h4NBGUiEY - mr7HX2w+yzqcGFNLI1aFPe2IwFt120QPLyyl - cZgc6FUBX4YCnWoCb0aFyyOT76AQkKF5YBRn - gAv6S8q1pZ/0B5w4gjaLEGlts3LG0bxZ1GJd - gCQMEhgYgyXUchTtZA== ) - 3600 NSEC prep.example. A RRSIG NSEC - 3600 RRSIG NSEC 8 3 3600 ( - 20171105054434 20171006054434 19260 prep.example. - rDWN40u1a3DSzWOrS+4YR2XOxaem0BAQ/glN - QkXNDew1WsZo3fe0IHIhDKlJ/5MJAfAHq8Xs - A5UGUw2efoNAN/0LuWsI/9IPm4dwQOXiTCly - uxugXf5islPYyvn1Z14ay/7/2P3W6HZknXzo - lZFpwqfFZQCxz7c/1aH+2ntAMeqx8LHuewSr - Rz/sLsSiCcZQ6NMWnZdoC5SGy4CTcIIPPS8z - 9dQ6QYTC5iq4MKRfyJUyvODyU9be4e6jbo5b - mjRcov4ttbImhD5jrLAZIfjO6DSazGNVFf/x - 6rjxjrc8SISPkt2xYwcOlYch9OZuoH86wcZu - 3Don6yAnLDYDrZylAA== ) diff --git a/bin/tests/system/checkds/prep.example.ds.db b/bin/tests/system/checkds/prep.example.ds.db deleted file mode 100644 index dddcad64684..00000000000 --- a/bin/tests/system/checkds/prep.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -prep.example. IN DS 65482 8 1 F3673708FBADDEC3EB55933E2E393ACE85EAC2BB -prep.example. IN DS 65482 8 2 51A7C97AAC42803DA515D1CAFEE28031A5018F6345F12F4B6C1B6D20 02B59820 diff --git a/bin/tests/system/checkds/tests.sh b/bin/tests/system/checkds/tests.sh deleted file mode 100644 index b205d25cde6..00000000000 --- a/bin/tests/system/checkds/tests.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/sh -# -# 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. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if [ "$CYGWIN" ]; then - DIG=".\dig.bat" - WINDSFROMKEY=`cygpath -w $DSFROMKEY` - CHECKDS="$CHECKDS -a sha1 -a sha256 -d $DIG -D $WINDSFROMKEY" -else - DIG="./dig.sh" - CHECKDS="$CHECKDS -a sha1 -a sha256 -d $DIG -D $DSFROMKEY" -fi -chmod +x $DIG - -status=0 -n=1 - -echo_i "checking for correct DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS ok.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for correct DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f ok.example.dnskey.db ok.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for incorrect DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS wrong.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for incorrect DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f wrong.example.dnskey.db wrong.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for partially missing DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS missing.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for partially missing DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f missing.example.dnskey.db missing.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for entirely missing DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS none.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for entirely missing DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f none.example.dnskey.db none.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking with prepared dsset file ($n)" -ret=0 -$CHECKDS -f prep.example.db -s prep.example.ds.db prep.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -if [ $status = 0 ]; then $SHELL clean.sh; fi -echo_i "exit status: $status" -[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/checkds/wrong.example.dnskey.db b/bin/tests/system/checkds/wrong.example.dnskey.db deleted file mode 100644 index cc5bfd6fa10..00000000000 --- a/bin/tests/system/checkds/wrong.example.dnskey.db +++ /dev/null @@ -1,2 +0,0 @@ -wrong.example. 3600 IN DNSKEY 257 3 5 AwEAAc6Cz10GXEh5lxA9ujTY/QarTajcUOBwwBYIeldjRsgoouK/UioY FYgxEFL0O5JK6YCRUoGzl3EgLr5GvNyhIp1PZpOpHf7o/4MVOZTGJzm/ sHWP5B+KcYjQOxJiDb433iCmRM4DpHPUUoxw0QbZglzAzl5MfKBoyZud lH59DdT/50bkBg8iVu35EzuW0SYt31k70hxHBSb2wAGWeqxEPKJ1nQiI UcrWNDeem7byrqjPN9wyZhq0XkQ9qbcYxAkRNd8Y7P0FyR1YKJMc6SWZ Ru7muvxqTHgCtJVgxVz4qndCFKdYidiDeKe2/X/z5gf7pyYl3549O8JR tWdNKqutppk= -wrong.example. 3600 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/wrong.example.ds.db b/bin/tests/system/checkds/wrong.example.ds.db deleted file mode 100644 index d7df6104a21..00000000000 --- a/bin/tests/system/checkds/wrong.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -wrong.example. 3600 IN DS 1192 5 1 684BB5119673C9272A0A7582AF8576561B5D80EC -wrong.example. 3600 IN DS 1192 5 2 14E4A873360E512CD2E8C2C331C4472F5EDAB0736669901F4D42E976 3D7B1F5C diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 1ea6a273c50..5bd08cc8d66 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -29,9 +29,7 @@ CYGWIN="" ARPANAME=$TOP/bin/tools/arpaname CDS=$TOP/bin/dnssec/dnssec-cds CHECKCONF=$TOP/bin/check/named-checkconf -CHECKDS=$TOP/bin/python/dnssec-checkds CHECKZONE=$TOP/bin/check/named-checkzone -COVERAGE=$TOP/bin/python/dnssec-coverage DDNSCONFGEN=$TOP/bin/confgen/ddns-confgen DELV=$TOP/bin/delv/delv DIG=$TOP/bin/dig/dig @@ -44,7 +42,6 @@ IMPORTKEY=$TOP/bin/dnssec/dnssec-importkey JOURNALPRINT=$TOP/bin/tools/named-journalprint KEYFRLAB=$TOP/bin/dnssec/dnssec-keyfromlabel KEYGEN=$TOP/bin/dnssec/dnssec-keygen -KEYMGR=$TOP/bin/python/dnssec-keymgr MDIG=$TOP/bin/tools/mdig NAMED=$TOP/bin/named/named NSEC3HASH=$TOP/bin/tools/nsec3hash @@ -82,7 +79,7 @@ KRB5_CONFIG=/dev/null SEQUENTIAL_UNIX="@PKCS11_TEST@" SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_UNIX" -PARALLEL_UNIX="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@ logfileconfig" +PARALLEL_UNIX="@DNSTAP@ logfileconfig" PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_UNIX" SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS" diff --git a/bin/tests/system/conf.sh.win32 b/bin/tests/system/conf.sh.win32 index be55dd8eda1..0b66f72b15f 100644 --- a/bin/tests/system/conf.sh.win32 +++ b/bin/tests/system/conf.sh.win32 @@ -33,9 +33,7 @@ VSCONF=${VSCONF:-Debug} ARPANAME=$TOP/Build/$VSCONF/arpaname@EXEEXT@ CDS=$TOP/Build/$VSCONF/dnssec-cds@EXEEXT@ CHECKCONF=$TOP/Build/$VSCONF/named-checkconf@EXEEXT@ -CHECKDS="$PYTHON `cygpath -w $TOP/bin/python/dnssec-checkds.py`" CHECKZONE=$TOP/Build/$VSCONF/named-checkzone@EXEEXT@ -COVERAGE="$PYTHON `cygpath -w $TOP/bin/python/dnssec-coverage.py`" DDNSCONFGEN=$TOP/Build/$VSCONF/ddns-confgen@EXEEXT@ DELV=$TOP/Build/$VSCONF/delv@EXEEXT@ DIG=$TOP/Build/$VSCONF/dig@EXEEXT@ @@ -47,7 +45,6 @@ IMPORTKEY=$TOP/Build/$VSCONF/dnssec-importkey@EXEEXT@ JOURNALPRINT=$TOP/Build/$VSCONF/named-journalprint@EXEEXT@ KEYFRLAB=$TOP/Build/$VSCONF/dnssec-keyfromlabel@EXEEXT@ KEYGEN=$TOP/Build/$VSCONF/dnssec-keygen@EXEEXT@ -KEYMGR="$PYTHON `cygpath -w $TOP/bin/python/dnssec-keymgr.py`" MDIG=$TOP/Build/$VSCONF/mdig@EXEEXT@ NAMED=$TOP/Build/$VSCONF/named@EXEEXT@ NSEC3HASH=$TOP/Build/$VSCONF/nsec3hash@EXEEXT@ @@ -88,7 +85,7 @@ KRB5_CONFIG=NUL SEQUENTIAL_WINDOWS="" SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_WINDOWS" -PARALLEL_WINDOWS="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@" +PARALLEL_WINDOWS="@DNSTAP@" PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_WINDOWS" SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS" diff --git a/bin/tests/system/coverage/01-ksk-inactive/README b/bin/tests/system/coverage/01-ksk-inactive/README deleted file mode 100644 index 81025936f92..00000000000 --- a/bin/tests/system/coverage/01-ksk-inactive/README +++ /dev/null @@ -1,10 +0,0 @@ -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-31-Jul (20:59:14): - Inactive: example.com/007/45435 (KSK) -No KSK's are active - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/01-ksk-inactive/expect b/bin/tests/system/coverage/01-ksk-inactive/expect deleted file mode 100644 index 3d342b1a2ba..00000000000 --- a/bin/tests/system/coverage/01-ksk-inactive/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-d 1h -m 2h" -warn=0 -error=1 -ok=1 -retcode=1 -match="No KSK's are active" diff --git a/bin/tests/system/coverage/02-zsk-inactive/README b/bin/tests/system/coverage/02-zsk-inactive/README deleted file mode 100644 index 5d3fed12454..00000000000 --- a/bin/tests/system/coverage/02-zsk-inactive/README +++ /dev/null @@ -1,10 +0,0 @@ -This set includes one ZSK rollover. The first ZSK is deactivated -prior to its replacement being activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK - -Checking ZSK events for zone example.com, algorithm 7: -ERROR: After 2012-05-Dec (20:39:32): - Inactive: example.com/005/08376 (ZSK) -No ZSK's are active diff --git a/bin/tests/system/coverage/02-zsk-inactive/expect b/bin/tests/system/coverage/02-zsk-inactive/expect deleted file mode 100644 index a905b585d47..00000000000 --- a/bin/tests/system/coverage/02-zsk-inactive/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-d 1h -m 2h" -warn=0 -error=1 -ok=1 -retcode=1 -match="No ZSK's are active" diff --git a/bin/tests/system/coverage/03-ksk-unpublished/README b/bin/tests/system/coverage/03-ksk-unpublished/README deleted file mode 100644 index 7d8a3015a57..00000000000 --- a/bin/tests/system/coverage/03-ksk-unpublished/README +++ /dev/null @@ -1,10 +0,0 @@ -This set contains one KSK rollover. The KSK is unpublished before its -successor is published. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-06-Oct (21:07:57): - Delete: example.com/007/23040 (KSK) -No KSK's are published - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/03-ksk-unpublished/expect b/bin/tests/system/coverage/03-ksk-unpublished/expect deleted file mode 100644 index 07bbff11d9a..00000000000 --- a/bin/tests/system/coverage/03-ksk-unpublished/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (KSK) is scheduled for -deletion before inactivation -No KSK's are published" diff --git a/bin/tests/system/coverage/04-zsk-unpublished/README b/bin/tests/system/coverage/04-zsk-unpublished/README deleted file mode 100644 index 5077abfd459..00000000000 --- a/bin/tests/system/coverage/04-zsk-unpublished/README +++ /dev/null @@ -1,10 +0,0 @@ -This set contains one ZSK rollover. The ZSK is unpublished before its -successor is published. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK - -Checking ZSK events for zone example.com, algorithm 7: -ERROR: After 2012-06-Oct (21:13:45): - Delete: example.com/007/25967 (ZSK) -No ZSK's are published diff --git a/bin/tests/system/coverage/04-zsk-unpublished/expect b/bin/tests/system/coverage/04-zsk-unpublished/expect deleted file mode 100644 index 450ec24bff0..00000000000 --- a/bin/tests/system/coverage/04-zsk-unpublished/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (ZSK) is scheduled for -deletion before inactivation -No ZSK's are published" diff --git a/bin/tests/system/coverage/05-ksk-unpub-active/README b/bin/tests/system/coverage/05-ksk-unpub-active/README deleted file mode 100644 index 119c1b2dac7..00000000000 --- a/bin/tests/system/coverage/05-ksk-unpub-active/README +++ /dev/null @@ -1,12 +0,0 @@ -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-05-Dec (21:22:19): - Delete: example.com/007/06219 (KSK) - Publish: example.com/007/20559 (KSK) -No KSK's are both active and published - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/05-ksk-unpub-active/expect b/bin/tests/system/coverage/05-ksk-unpub-active/expect deleted file mode 100644 index 2edfa0e76ed..00000000000 --- a/bin/tests/system/coverage/05-ksk-unpub-active/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (KSK) is scheduled for -deletion before inactivation -No KSK's are both active and published" diff --git a/bin/tests/system/coverage/06-zsk-unpub-active/README b/bin/tests/system/coverage/06-zsk-unpub-active/README deleted file mode 100644 index 84833f8431d..00000000000 --- a/bin/tests/system/coverage/06-zsk-unpub-active/README +++ /dev/null @@ -1,12 +0,0 @@ -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK - -Checking ZSK events for zone example.com, algorithm 7: -ERROR: After 2012-05-Dec (20:44:18): - Delete: example.com/007/26369 (ZSK) - Publish: example.com/007/21029 (ZSK) -No ZSK's are both active and published diff --git a/bin/tests/system/coverage/06-zsk-unpub-active/expect b/bin/tests/system/coverage/06-zsk-unpub-active/expect deleted file mode 100644 index 0ef5b151e6c..00000000000 --- a/bin/tests/system/coverage/06-zsk-unpub-active/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (ZSK) is scheduled for -deletion before inactivation -No ZSK's are both active and published" diff --git a/bin/tests/system/coverage/07-ksk-ttl/README b/bin/tests/system/coverage/07-ksk-ttl/README deleted file mode 100644 index 265909921b2..00000000000 --- a/bin/tests/system/coverage/07-ksk-ttl/README +++ /dev/null @@ -1,4 +0,0 @@ -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. - -Expected tool output TBD. diff --git a/bin/tests/system/coverage/07-ksk-ttl/expect b/bin/tests/system/coverage/07-ksk-ttl/expect deleted file mode 100644 index eade21a75fd..00000000000 --- a/bin/tests/system/coverage/07-ksk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -args="-d 1w -m 2w" -warn=1 -error=0 -ok=2 -retcode=0 -match="WARNING: Key .* (KSK) is activated too soon -after publication -Activation should be at least 7 days after -publication." diff --git a/bin/tests/system/coverage/08-zsk-ttl/README b/bin/tests/system/coverage/08-zsk-ttl/README deleted file mode 100644 index 265909921b2..00000000000 --- a/bin/tests/system/coverage/08-zsk-ttl/README +++ /dev/null @@ -1,4 +0,0 @@ -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. - -Expected tool output TBD. diff --git a/bin/tests/system/coverage/08-zsk-ttl/expect b/bin/tests/system/coverage/08-zsk-ttl/expect deleted file mode 100644 index 150c9cdc8fa..00000000000 --- a/bin/tests/system/coverage/08-zsk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -args="-d 1w -m 2w" -warn=1 -error=0 -ok=2 -retcode=0 -match="WARNING: Key .* (ZSK) is activated too soon -after publication -Activation should be at least 7 days after -publication." diff --git a/bin/tests/system/coverage/09-check-zsk/README b/bin/tests/system/coverage/09-check-zsk/README deleted file mode 100644 index bc5edc813cb..00000000000 --- a/bin/tests/system/coverage/09-check-zsk/README +++ /dev/null @@ -1,6 +0,0 @@ -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated; however, as we are only checking ZSK's, -we should not detect the error. Tool output should resemble: - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/09-check-zsk/expect b/bin/tests/system/coverage/09-check-zsk/expect deleted file mode 100644 index d56c4bfb983..00000000000 --- a/bin/tests/system/coverage/09-check-zsk/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-z -d 1h -m 2h" -warn=0 -error=0 -ok=1 -retcode=0 -match="" diff --git a/bin/tests/system/coverage/10-check-ksk/README b/bin/tests/system/coverage/10-check-ksk/README deleted file mode 100644 index 948364d9979..00000000000 --- a/bin/tests/system/coverage/10-check-ksk/README +++ /dev/null @@ -1,7 +0,0 @@ -This set includes one ZSK rollover. The first ZSK is deactivated -prior to its replacement being activated; however, as we are only -checking KSKs, we should not detect the error. Tool output should -resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/10-check-ksk/expect b/bin/tests/system/coverage/10-check-ksk/expect deleted file mode 100644 index a03d2aa2e9b..00000000000 --- a/bin/tests/system/coverage/10-check-ksk/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-k -d 1h -m 2h" -warn=0 -error=0 -ok=1 -retcode=0 -match="" diff --git a/bin/tests/system/coverage/11-cutoff/README b/bin/tests/system/coverage/11-cutoff/README deleted file mode 100644 index 81025936f92..00000000000 --- a/bin/tests/system/coverage/11-cutoff/README +++ /dev/null @@ -1,10 +0,0 @@ -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-31-Jul (20:59:14): - Inactive: example.com/007/45435 (KSK) -No KSK's are active - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/11-cutoff/expect b/bin/tests/system/coverage/11-cutoff/expect deleted file mode 100644 index bdf29d026d4..00000000000 --- a/bin/tests/system/coverage/11-cutoff/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-l 1y -d 1h -m 2h" -warn=0 -error=0 -ok=2 -retcode=0 -match="" diff --git a/bin/tests/system/coverage/12-ksk-deletion/expect b/bin/tests/system/coverage/12-ksk-deletion/expect deleted file mode 100644 index 898c0bf0ba1..00000000000 --- a/bin/tests/system/coverage/12-ksk-deletion/expect +++ /dev/null @@ -1,6 +0,0 @@ -args= -warn=4 -error=1 -ok=1 -retcode=1 -match=0 diff --git a/bin/tests/system/coverage/13-dotted-dotless/expect b/bin/tests/system/coverage/13-dotted-dotless/expect deleted file mode 100644 index 5760d298dfa..00000000000 --- a/bin/tests/system/coverage/13-dotted-dotless/expect +++ /dev/null @@ -1,7 +0,0 @@ -args="-z -m2h" -warn=0 -error=0 -ok=2 -retcode=0 -match= -zones="one.example. two.example" diff --git a/bin/tests/system/coverage/clean.sh b/bin/tests/system/coverage/clean.sh deleted file mode 100644 index 9917e2e24f9..00000000000 --- a/bin/tests/system/coverage/clean.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# 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. - -rm -f named-compilezone -rm -f */K*.key -rm -f */K*.private -rm -rf coverage.* -rm -rf dotted-dotless -rm -f ns*/named.lock diff --git a/bin/tests/system/coverage/setup.sh b/bin/tests/system/coverage/setup.sh deleted file mode 100644 index bfb63c8c28e..00000000000 --- a/bin/tests/system/coverage/setup.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh -# -# 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. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -$SHELL clean.sh - -ln -s $CHECKZONE named-compilezone - -# Test 1: KSK goes inactive before successor is active -dir=01-ksk-inactive -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -$SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 2: ZSK goes inactive before successor is active -dir=02-zsk-inactive -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 3: KSK is unpublished before its successor is published -dir=03-ksk-unpublished -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -$SETTIME -K $dir -D +6mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 4: ZSK is unpublished before its successor is published -dir=04-zsk-unpublished -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -D +6mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 5: KSK deleted and successor published before KSK is deactivated -# and successor activated. -dir=05-ksk-unpub-active -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 6: ZSK deleted and successor published before ZSK is deactivated -# and successor activated. -dir=06-zsk-unpub-active -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 7: KSK rolled with insufficient delay after prepublication. -dir=07-ksk-ttl -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -# allow only 1 day between publication and activation -$SETTIME -K $dir -P +269d $ksk2 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 8: ZSK rolled with insufficient delay after prepublication. -dir=08-zsk-ttl -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -# allow only 1 day between publication and activation -$SETTIME -K $dir -P +269d $zsk2 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 9: KSK goes inactive before successor is active, but checking ZSKs -dir=09-check-zsk -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -$SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 10: ZSK goes inactive before successor is active, but checking KSKs -dir=10-check-ksk -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 11: ZSK goes inactive before successor is active, but after cutoff -dir=11-cutoff -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -I +16mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 12: Too early KSK deletion -dir=12-ksk-deletion -ksk1=`$KEYGEN -q -K $dir -f KSK -a 8 -b 2048 -I +40d -D +40d example.com` -ksk2=`$KEYGEN -q -K $dir -S $ksk1.key example.com` - -# Test 13: check names with/without dots at the end -dir=13-dotted-dotless -zsk1=`$KEYGEN -q -K $dir -a rsasha256 one.example` -zsk2=`$KEYGEN -q -K $dir -a rsasha256 two.example` diff --git a/bin/tests/system/coverage/tests.sh b/bin/tests/system/coverage/tests.sh deleted file mode 100644 index 7434358558a..00000000000 --- a/bin/tests/system/coverage/tests.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# -# 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. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -COVERAGE="$COVERAGE -c ./named-compilezone" - -status=0 -n=1 - -matchall () { - file=$1 - echo "$2" | while read matchline; do - grep "$matchline" $file > /dev/null 2>&1 || { - echo "FAIL" - return - } - done -} - -echo_i "checking for DNSSEC key coverage issues" -ret=0 -for dir in [0-9][0-9]-*; do - ret=0 - echo_i "$dir" - args= warn= error= ok= retcode= match= zones= - . $dir/expect - $COVERAGE $args -K $dir ${zones:-example.com} > coverage.$n 2>&1 - - # check that return code matches expectations - found=$? - if [ $found -ne $retcode ]; then - echo "retcode was $found expected $retcode" - ret=1 - fi - - # check for correct number of errors - found=`grep ERROR coverage.$n | wc -l` - if [ $found -ne $error ]; then - echo "error count was $found expected $error" - ret=1 - fi - - # check for correct number of warnings - found=`grep WARNING coverage.$n | wc -l` - if [ $found -ne $warn ]; then - echo "warning count was $found expected $warn" - ret=1 - fi - - # check for correct number of OKs - found=`grep "No errors found" coverage.$n | wc -l` - if [ $found -ne $ok ]; then - echo "good count was $found expected $ok" - ret=1 - fi - - found=`matchall coverage.$n "$match"` - if [ "$found" = "FAIL" ]; then - echo "no match on '$match'" - ret=1 - fi - - found=`grep Traceback coverage.$n | wc -l` - if [ $found -ne 0 ]; then - echo "python exception detected" - ret=1 - fi - - n=`expr $n + 1` - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` -done - -echo_i "exit status: $status" -[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/keymgr/01-ksk-inactive/README b/bin/tests/system/keymgr/01-ksk-inactive/README deleted file mode 100644 index b91a6757634..00000000000 --- a/bin/tests/system/keymgr/01-ksk-inactive/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated. diff --git a/bin/tests/system/keymgr/01-ksk-inactive/expect b/bin/tests/system/keymgr/01-ksk-inactive/expect deleted file mode 100644 index bf908e7c212..00000000000 --- a/bin/tests/system/keymgr/01-ksk-inactive/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/02-zsk-inactive/README b/bin/tests/system/keymgr/02-zsk-inactive/README deleted file mode 100644 index 9d1e17f554e..00000000000 --- a/bin/tests/system/keymgr/02-zsk-inactive/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one ZSK rollover. The first ZSK is deactivated -prior to its replacement being activated. diff --git a/bin/tests/system/keymgr/02-zsk-inactive/expect b/bin/tests/system/keymgr/02-zsk-inactive/expect deleted file mode 100644 index bf908e7c212..00000000000 --- a/bin/tests/system/keymgr/02-zsk-inactive/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/03-ksk-unpublished/README b/bin/tests/system/keymgr/03-ksk-unpublished/README deleted file mode 100644 index 513e9bda0af..00000000000 --- a/bin/tests/system/keymgr/03-ksk-unpublished/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set contains one KSK rollover. The KSK is unpublished before its -successor is published. diff --git a/bin/tests/system/keymgr/03-ksk-unpublished/expect b/bin/tests/system/keymgr/03-ksk-unpublished/expect deleted file mode 100644 index bf908e7c212..00000000000 --- a/bin/tests/system/keymgr/03-ksk-unpublished/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/04-zsk-unpublished/README b/bin/tests/system/keymgr/04-zsk-unpublished/README deleted file mode 100644 index a5185563854..00000000000 --- a/bin/tests/system/keymgr/04-zsk-unpublished/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set contains one ZSK rollover. The ZSK is unpublished before its -successor is published. diff --git a/bin/tests/system/keymgr/04-zsk-unpublished/expect b/bin/tests/system/keymgr/04-zsk-unpublished/expect deleted file mode 100644 index bf908e7c212..00000000000 --- a/bin/tests/system/keymgr/04-zsk-unpublished/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/05-ksk-unpub-active/README b/bin/tests/system/keymgr/05-ksk-unpub-active/README deleted file mode 100644 index e6a194b6fbc..00000000000 --- a/bin/tests/system/keymgr/05-ksk-unpub-active/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. diff --git a/bin/tests/system/keymgr/05-ksk-unpub-active/expect b/bin/tests/system/keymgr/05-ksk-unpub-active/expect deleted file mode 100644 index bf908e7c212..00000000000 --- a/bin/tests/system/keymgr/05-ksk-unpub-active/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/06-zsk-unpub-active/README b/bin/tests/system/keymgr/06-zsk-unpub-active/README deleted file mode 100644 index e6a194b6fbc..00000000000 --- a/bin/tests/system/keymgr/06-zsk-unpub-active/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. diff --git a/bin/tests/system/keymgr/06-zsk-unpub-active/expect b/bin/tests/system/keymgr/06-zsk-unpub-active/expect deleted file mode 100644 index bf908e7c212..00000000000 --- a/bin/tests/system/keymgr/06-zsk-unpub-active/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/07-ksk-ttl/README b/bin/tests/system/keymgr/07-ksk-ttl/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/07-ksk-ttl/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/07-ksk-ttl/expect b/bin/tests/system/keymgr/07-ksk-ttl/expect deleted file mode 100644 index 03d719c3f4c..00000000000 --- a/bin/tests/system/keymgr/07-ksk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/08-zsk-ttl/README b/bin/tests/system/keymgr/08-zsk-ttl/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/08-zsk-ttl/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/08-zsk-ttl/expect b/bin/tests/system/keymgr/08-zsk-ttl/expect deleted file mode 100644 index 03d719c3f4c..00000000000 --- a/bin/tests/system/keymgr/08-zsk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/09-no-keys/README b/bin/tests/system/keymgr/09-no-keys/README deleted file mode 100644 index 5f4d53ab490..00000000000 --- a/bin/tests/system/keymgr/09-no-keys/README +++ /dev/null @@ -1,5 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has no key set, but one will be initialized by dnssec-keymgr. diff --git a/bin/tests/system/keymgr/09-no-keys/expect b/bin/tests/system/keymgr/09-no-keys/expect deleted file mode 100644 index 03d719c3f4c..00000000000 --- a/bin/tests/system/keymgr/09-no-keys/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/10-change-roll/README b/bin/tests/system/keymgr/10-change-roll/README deleted file mode 100644 index 8cf6f4e6a62..00000000000 --- a/bin/tests/system/keymgr/10-change-roll/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has a key set which is valid, but has a ZSK rollover period -of only three months. It will be updated to have a ZSK rollover period of -one year. diff --git a/bin/tests/system/keymgr/10-change-roll/expect b/bin/tests/system/keymgr/10-change-roll/expect deleted file mode 100644 index 03d719c3f4c..00000000000 --- a/bin/tests/system/keymgr/10-change-roll/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/11-many-simul/README b/bin/tests/system/keymgr/11-many-simul/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/11-many-simul/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/11-many-simul/expect b/bin/tests/system/keymgr/11-many-simul/expect deleted file mode 100644 index 03d719c3f4c..00000000000 --- a/bin/tests/system/keymgr/11-many-simul/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/12-many-active/README b/bin/tests/system/keymgr/12-many-active/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/12-many-active/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/12-many-active/expect b/bin/tests/system/keymgr/12-many-active/expect deleted file mode 100644 index 67fc4e912c4..00000000000 --- a/bin/tests/system/keymgr/12-many-active/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="-f example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/13-noroll/README b/bin/tests/system/keymgr/13-noroll/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/13-noroll/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/13-noroll/expect b/bin/tests/system/keymgr/13-noroll/expect deleted file mode 100644 index 67fc4e912c4..00000000000 --- a/bin/tests/system/keymgr/13-noroll/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="-f example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/14-wrongalg/README b/bin/tests/system/keymgr/14-wrongalg/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/14-wrongalg/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/14-wrongalg/expect b/bin/tests/system/keymgr/14-wrongalg/expect deleted file mode 100644 index bd5eadbf7af..00000000000 --- a/bin/tests/system/keymgr/14-wrongalg/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=4 diff --git a/bin/tests/system/keymgr/15-unspec/README b/bin/tests/system/keymgr/15-unspec/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/15-unspec/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/15-unspec/expect b/bin/tests/system/keymgr/15-unspec/expect deleted file mode 100644 index ad300c498cb..00000000000 --- a/bin/tests/system/keymgr/15-unspec/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/16-wrongalg-unspec/README b/bin/tests/system/keymgr/16-wrongalg-unspec/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/16-wrongalg-unspec/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/16-wrongalg-unspec/expect b/bin/tests/system/keymgr/16-wrongalg-unspec/expect deleted file mode 100644 index c836535ce82..00000000000 --- a/bin/tests/system/keymgr/16-wrongalg-unspec/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=4 diff --git a/bin/tests/system/keymgr/17-noforce/README b/bin/tests/system/keymgr/17-noforce/README deleted file mode 100644 index 791b6d38483..00000000000 --- a/bin/tests/system/keymgr/17-noforce/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/17-noforce/expect b/bin/tests/system/keymgr/17-noforce/expect deleted file mode 100644 index 029a4e903ab..00000000000 --- a/bin/tests/system/keymgr/17-noforce/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=1 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/18-nonstd-prepub/README b/bin/tests/system/keymgr/18-nonstd-prepub/README deleted file mode 100644 index fc1aacae933..00000000000 --- a/bin/tests/system/keymgr/18-nonstd-prepub/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has a key set which is valid, but will expire within -the rollover period. The prepublication interval in policy.conf is a -nonstandard value. diff --git a/bin/tests/system/keymgr/18-nonstd-prepub/expect b/bin/tests/system/keymgr/18-nonstd-prepub/expect deleted file mode 100644 index e8518d8c3a1..00000000000 --- a/bin/tests/system/keymgr/18-nonstd-prepub/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 1d example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/18-nonstd-prepub/policy.conf b/bin/tests/system/keymgr/18-nonstd-prepub/policy.conf deleted file mode 100644 index 91817ff41b6..00000000000 --- a/bin/tests/system/keymgr/18-nonstd-prepub/policy.conf +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ - -policy default { - policy global; - algorithm nsec3rsasha1; - pre-publish zsk 2w; - roll-period zsk 6mo; - coverage 364d; -}; diff --git a/bin/tests/system/keymgr/19-old-keys/README b/bin/tests/system/keymgr/19-old-keys/README deleted file mode 100644 index 424b70c4f55..00000000000 --- a/bin/tests/system/keymgr/19-old-keys/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has a key set which is valid, but which was published -and activated more than one rollover period ago. dnssec-keymgr should -not mark the keys as already being inactive and deleted. diff --git a/bin/tests/system/keymgr/19-old-keys/expect b/bin/tests/system/keymgr/19-old-keys/expect deleted file mode 100644 index ad73b536c98..00000000000 --- a/bin/tests/system/keymgr/19-old-keys/expect +++ /dev/null @@ -1,12 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 1w example.com" -cmatch="4,Publish -4,Activate -2,Inactive -2,Delete" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/19-old-keys/extra.sh b/bin/tests/system/keymgr/19-old-keys/extra.sh deleted file mode 100644 index 8da6aa1329b..00000000000 --- a/bin/tests/system/keymgr/19-old-keys/extra.sh +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -now=`$PERL -e 'print time()."\n";'` -for keyfile in K*.key; do - inactive=`$SETTIME -upI $keyfile | awk '{print $2}'` - if [ "$inactive" = UNSET ]; then - continue - elif [ "$inactive" -lt "$now" ]; then - echo_d "inactive date is in the past" - ret=1 - fi -done diff --git a/bin/tests/system/keymgr/19-old-keys/policy.conf b/bin/tests/system/keymgr/19-old-keys/policy.conf deleted file mode 100644 index 91817ff41b6..00000000000 --- a/bin/tests/system/keymgr/19-old-keys/policy.conf +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ - -policy default { - policy global; - algorithm nsec3rsasha1; - pre-publish zsk 2w; - roll-period zsk 6mo; - coverage 364d; -}; diff --git a/bin/tests/system/keymgr/clean.sh b/bin/tests/system/keymgr/clean.sh deleted file mode 100644 index 3f7f658f705..00000000000 --- a/bin/tests/system/keymgr/clean.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# 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. - -rm -f K*.key */K*.key -rm -f K*.private */K*.private -rm -f coverage.* keymgr.* settime.* -rm -f ns*/managed-keys.bind* -rm -f policy.out diff --git a/bin/tests/system/keymgr/policy.conf b/bin/tests/system/keymgr/policy.conf deleted file mode 100644 index 4da487a61d6..00000000000 --- a/bin/tests/system/keymgr/policy.conf +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -policy default { - policy global; - algorithm nsec3rsasha1; - key-size zsk 1024; - pre-publish zsk 6w; - post-publish zsk 6w; - roll-period zsk 6mo; - roll-period ksk 0; - coverage 364d; -}; diff --git a/bin/tests/system/keymgr/policy.good b/bin/tests/system/keymgr/policy.good deleted file mode 100644 index eb23246214f..00000000000 --- a/bin/tests/system/keymgr/policy.good +++ /dev/null @@ -1,187 +0,0 @@ -policy default: - inherits global - directory None - algorithm None - coverage None - ksk_keysize None - zsk_keysize None - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -policy global: - inherits None - directory None - algorithm RSASHA256 - coverage 15552000 - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod None - zsk_rollperiod 31536000 - ksk_prepublish 2592000 - ksk_postpublish 2592000 - zsk_prepublish 2592000 - zsk_postpublish 2592000 - ksk_standby None - zsk_standby None - keyttl 3600 - -constructed policy example.com: - inherits global - directory None - algorithm RSASHA256 - coverage 15552000 - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod None - zsk_rollperiod 31536000 - ksk_prepublish 2592000 - ksk_postpublish 2592000 - zsk_prepublish 2592000 - zsk_postpublish 2592000 - ksk_standby None - zsk_standby None - keyttl 3600 - -policy default: - inherits None - directory "keydir" - algorithm RSASHA1 - coverage 31536000 - ksk_keysize None - zsk_keysize None - ksk_rollperiod None - zsk_rollperiod 15552000 - ksk_prepublish None - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 3628800 - ksk_standby None - zsk_standby None - keyttl 3600 - -zone policy example.com: - inherits extra - directory "keydir" - algorithm NSEC3RSASHA1 - coverage 12960000 - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod 31536000 - zsk_rollperiod 7776000 - ksk_prepublish 7776000 - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 604800 - ksk_standby None - zsk_standby None - keyttl 7200 - -constructed policy example.org: - inherits None - directory "keydir" - algorithm RSASHA1 - coverage 31536000 - ksk_keysize 2048 - zsk_keysize 1024 - ksk_rollperiod None - zsk_rollperiod 15552000 - ksk_prepublish None - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 3628800 - ksk_standby None - zsk_standby None - keyttl 3600 - -constructed policy example.net: - inherits None - directory "keydir" - algorithm RSASHA1 - coverage 31536000 - ksk_keysize 2048 - zsk_keysize 1024 - ksk_rollperiod None - zsk_rollperiod 15552000 - ksk_prepublish None - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 3628800 - ksk_standby None - zsk_standby None - keyttl 3600 - -algorithm policy RSASHA1: - inherits None - directory None - algorithm None - coverage None - ksk_keysize 2048 - zsk_keysize 1024 - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -algorithm policy RSASHA256: - inherits None - directory None - algorithm RSASHA256 - coverage None - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -algorithm policy ECDSAP256SHA256: - inherits None - directory None - algorithm ECDSAP256SHA256 - coverage None - ksk_keysize None - zsk_keysize None - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -policy extra: - inherits default - directory None - algorithm None - coverage 157680000 - ksk_keysize None - zsk_keysize None - ksk_rollperiod 31536000 - zsk_rollperiod 7776000 - ksk_prepublish 7776000 - ksk_postpublish None - zsk_prepublish None - zsk_postpublish 604800 - ksk_standby None - zsk_standby None - keyttl 7200 - diff --git a/bin/tests/system/keymgr/policy.sample b/bin/tests/system/keymgr/policy.sample deleted file mode 100644 index 4594091fa80..00000000000 --- a/bin/tests/system/keymgr/policy.sample +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -# a comment which should be skipped - -algorithm-policy rsasha1 { - key-size ksk 2048; - key-size zsk 1024; // this too -}; - -// and this - -policy default { - directory "keydir"; - algorithm rsasha1; - coverage 1y; # another comment - roll-period zsk 6mo; // and yet another - pre-publish zsk 6w; - post-publish zsk 6w; - keyttl 1h; -}; - -policy extra { - policy default; - coverage 5y; - roll-period KSK 1 year; - roll-period zsk 3mo; - pre-publish ksk 3mo; - post-publish zsk 1w; - keyttl 2h; -}; - -/* - * and this is also a comment, - * and it should be ignored like - * the others. - */ - -zone example.com { - policy extra; - coverage 5 mon; - algorithm nsec3rsasha1; -}; - -/* - * This confirms that zones starting with digits are accepted. - */ -zone "99example.com" { - policy global; -}; diff --git a/bin/tests/system/keymgr/setup.sh b/bin/tests/system/keymgr/setup.sh deleted file mode 100644 index bd6a6f0afe3..00000000000 --- a/bin/tests/system/keymgr/setup.sh +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# 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. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -KEYGEN="$KEYGEN -q" - -# Test 1: KSK goes inactive before successor is active -dir=01-ksk-inactive -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -$SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 2: ZSK goes inactive before successor is active -dir=02-zsk-inactive -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -$SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 3: KSK is unpublished before its successor is published -dir=03-ksk-unpublished -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -$SETTIME -K $dir -D +6mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 4: ZSK is unpublished before its successor is published -dir=04-zsk-unpublished -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -$SETTIME -K $dir -D +6mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 5: KSK deleted and successor published before KSK is deactivated -# and successor activated. -dir=05-ksk-unpub-active -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 6: ZSK deleted and successor published before ZSK is deactivated -# and successor activated. -dir=06-zsk-unpub-active -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 7: KSK rolled with insufficient delay after prepublication. -dir=07-ksk-ttl -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -$SETTIME -K $dir -P +269d $ksk2 > /dev/null 2>&1 -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 8: ZSK rolled with insufficient delay after prepublication. -dir=08-zsk-ttl -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -# allow only 1 day between publication and activation -$SETTIME -K $dir -P +269d $zsk2 > /dev/null 2>&1 -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 9: No special preparation needed - -# Test 10: Valid key set, but rollover period has changed -dir=10-change-roll -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +3mo -D +4mo $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` - -# Test 11: Many keys all simultaneously scheduled to be active in the future -dir=11-many-simul -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk -P now+1mo -A now+1mo example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` -z2=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` -z3=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` -z4=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` - -# Test 12: Many keys all simultaneously scheduled to be active in the past -dir=12-many-active -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z3=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` - -# Test 13: Multiple simultaneous keys with no configured roll period -dir=13-noroll -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -k2=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -k3=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` - -# Test 14: Keys exist but have the wrong algorithm -dir=14-wrongalg -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q example.com` -$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null -z2=`$KEYGEN -K $dir -q -S ${z1}.key` -$SETTIME -K $dir -I now+1y -D now+14mo $z2 > /dev/null -z3=`$KEYGEN -K $dir -q -S ${z2}.key` -$SETTIME -K $dir -I now+18mo -D now+20mo $z3 > /dev/null -z4=`$KEYGEN -K $dir -q -S ${z3}.key` - -# Test 15: No zones specified; just search the directory for keys -dir=15-unspec -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null -z2=`$KEYGEN -K $dir -q -S ${z1}.key` -$SETTIME -K $dir -I now+1y -D now+14mo $z2 > /dev/null -z3=`$KEYGEN -K $dir -q -S ${z2}.key` -$SETTIME -K $dir -I now+18mo -D now+20mo $z3 > /dev/null -z4=`$KEYGEN -K $dir -q -S ${z3}.key` - -# Test 16: No zones specified; search the directory for keys; -# keys have the wrong algorithm for their policies -dir=16-wrongalg-unspec -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q example.com` -$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null -z2=`$KEYGEN -K $dir -q -S ${z1}.key` -$SETTIME -K $dir -I now+1y -D now+14mo $z2 > /dev/null -z3=`$KEYGEN -K $dir -q -S ${z2}.key` -$SETTIME -K $dir -I now+18mo -D now+20mo $z3 > /dev/null -z4=`$KEYGEN -K $dir -q -S ${z3}.key` - -# Test 17: Keys are simultaneously active but we run with no force -# flag (this should fail) -dir=17-noforce -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z3=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` - -# Test 18: Prepublication interval is set to a nonstandard value -dir=18-nonstd-prepub -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I now+2mo -D now+3mo $zsk1 > /dev/null - -# Test 19: Key has been published/active a long time -dir=19-old-keys -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -P now-2y -A now-2y $ksk1 > /dev/null -$SETTIME -K $dir -P now-2y -A now-2y $zsk1 > /dev/null diff --git a/bin/tests/system/keymgr/testpolicy.py b/bin/tests/system/keymgr/testpolicy.py deleted file mode 100644 index 81b2ff068c9..00000000000 --- a/bin/tests/system/keymgr/testpolicy.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################ -# 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. -############################################################################ - -import sys -from isc import policy - -PP = policy.dnssec_policy() -# print the unmodified default and a generated zone policy -print(PP.named_policy['default']) -print(PP.named_policy['global']) -print(PP.policy('example.com')) - -if len(sys.argv) > 0: - for policy_file in sys.argv[1:]: - PP.load(policy_file) - - # now print the modified default and generated zone policies - print(PP.named_policy['default']) - print(PP.policy('example.com')) - print(PP.policy('example.org')) - print(PP.policy('example.net')) - - # print algorithm policies - print(PP.alg_policy['RSASHA1']) - print(PP.alg_policy['RSASHA256']) - print(PP.alg_policy['ECDSAP256SHA256']) - - # print another named policy - print(PP.named_policy['extra']) -else: - print("ERROR: Please provide an input file") diff --git a/bin/tests/system/keymgr/tests.sh b/bin/tests/system/keymgr/tests.sh deleted file mode 100644 index 8c4b20a3ab9..00000000000 --- a/bin/tests/system/keymgr/tests.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/sh -# -# 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. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -status=0 -n=1 - -matchall () { - match_result=ok - file=$1 - while IFS="," read expect matchline; do - [ -z "$matchline" ] && continue - matches=`grep "$matchline" $file | wc -l` - [ "$matches" -ne "$expect" ] && { - echo "'$matchline': expected $expect found $matches" - return 1 - } - done << EOF - $2 -EOF - return 0 -} - -echo_i "checking for DNSSEC key coverage issues" -ret=0 -for dir in [0-9][0-9]-*; do - ret=0 - echo_i "$dir ($n)" - kargs= cargs= kmatch= cmatch= kret= cret=0 warn= error= ok= - . $dir/expect - - # use policy.conf if available - policy="" - if [ -e "$dir/policy.conf" ]; then - policy="-c $dir/policy.conf" - if grep -e "-c policy.conf" $dir/expect > /dev/null - then - echo_i "fix $dir/expect: multiple policy files" - ret=1 - fi - else - policy="-c policy.conf" - fi - - # run keymgr to update keys - if [ "$CYGWIN" ]; then - $KEYMGR $policy -K $dir -g `cygpath -w $KEYGEN` \ - -s `cygpath -w $SETTIME` $kargs > keymgr.$n 2>&1 - else - $KEYMGR $policy -K $dir -g $KEYGEN \ - -s $SETTIME $kargs > keymgr.$n 2>&1 - fi - # check that return code matches expectations - found=$? - if [ $found -ne $kret ]; then - echo "keymgr retcode was $found expected $kret" - ret=1 - fi - - # check for matches in keymgr output - matchall keymgr.$n "$kmatch" || ret=1 - - # now check coverage - $COVERAGE -K $dir $cargs > coverage.$n 2>&1 - # check that return code matches expectations - found=$? - if [ $found -ne $cret ]; then - echo "coverage retcode was $found expected $cret" - ret=1 - fi - - # check for correct number of errors - found=`grep ERROR coverage.$n | wc -l` - if [ $found -ne $error ]; then - echo "error count was $found expected $error" - ret=1 - fi - - # check for correct number of warnings - found=`grep WARNING coverage.$n | wc -l` - if [ $found -ne $warn ]; then - echo "warning count was $found expected $warn" - ret=1 - fi - - # check for correct number of OKs - found=`grep "No errors found" coverage.$n | wc -l` - if [ $found -ne $ok ]; then - echo "good count was $found expected $ok" - ret=1 - fi - - # check for matches in coverage output - matchall coverage.$n "$cmatch" || ret=1 - - if [ -f $dir/extra.sh ]; then - cd $dir - . ./extra.sh - cd .. - fi - - n=`expr $n + 1` - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` -done - -echo_i "checking domains ending in . ($n)" -ret=0 -$KEYMGR -g $KEYGEN -s $SETTIME . > keymgr.1.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.1.$n | wc -l` -[ "$nkeys" -eq 2 ] || ret=1 -$KEYMGR -g $KEYGEN -s $SETTIME . > keymgr.2.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.2.$n | wc -l` -[ "$nkeys" -eq 0 ] || ret=1 -$KEYMGR -g $KEYGEN -s $SETTIME example.com. > keymgr.3.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.3.$n | wc -l` -[ "$nkeys" -eq 2 ] || ret=1 -$KEYMGR -g $KEYGEN -s $SETTIME example.com. > keymgr.4.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.4.$n | wc -l` -[ "$nkeys" -eq 0 ] || ret=1 -status=`expr $status + $ret` -n=`expr $n + 1` - -echo_i "checking policy.conf parser ($n)" -ret=0 -PYTHONPATH="../../../python:$PYTHONPATH" ${PYTHON} testpolicy.py policy.sample > policy.out -$DOS2UNIX policy.out > /dev/null 2>&1 -cmp -s policy.good policy.out || ret=1 -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` -n=`expr $n + 1` - -echo_i "exit status: $status" -[ $status -eq 0 ] || exit 1 diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp index fb7f86368c0..7172de39e92 100644 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp @@ -190,10 +190,6 @@ const FileData installFiles[] = {"pkcs11-keygen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, {"pkcs11-list.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, {"pkcs11-tokens.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, -#endif -#ifdef USE_PYTHON - {"dnssec-checkds.py", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-coverage.py", FileData::BinDir, FileData::Normal, FALSE, FALSE}, #endif {"readme1st.txt", FileData::BinDir, FileData::Trivial, FALSE, TRUE}, {NULL, -1, -1} diff --git a/configure b/configure index 68587664549..79c05b87de6 100755 --- a/configure +++ b/configure @@ -764,13 +764,6 @@ MAXMINDDB_LIBS MAXMINDDB_CFLAGS ISC_PLATFORM_NORETURN_POST ISC_PLATFORM_NORETURN_PRE -expanded_sysconfdir -PYTHON_INSTALL_LIB -PYTHON_INSTALL_DIR -PYTHON_TOOLS -KEYMGR -COVERAGE -CHECKDS PYTHON PERL LN @@ -902,7 +895,6 @@ enable_developer enable_fuzzing enable_mutex_atomics with_python -with_python_install_dir enable_kqueue enable_epoll enable_devpoll @@ -1655,9 +1647,7 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). - --with-python=PATH specify path to Python interpreter - --with-python-install-dir=PATH - installation directory for Python modules + --with-python=PATH specify path to Python 3 interpreter --with-geoip2 deprecated, use --with-maxminddb --with-maxminddb=PATH Build with MaxMind GeoIP2 support (auto|yes|no|path) [default=auto] @@ -12477,23 +12467,13 @@ done # -# Python is also optional but required by default so that dnssec-keymgr gets -# installed unless explicitly prevented by the user using --without-python. +# Python 3 is optional; it is used by the system test scripts. # testminvers='import sys -if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): +if (sys.version_info < (3,5)): exit(1)' -testargparse='try: import argparse -except: exit(1)' - -testply='try: import ply -except: exit(1)' - -testsetup='try: from distutils.core import setup -except: exit(1)' - -default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" +default_with_python="python python3 python3.8 python3.7 python3.6 python3.5" @@ -12506,14 +12486,6 @@ else fi -# Check whether --with-python-install-dir was given. -if test "${with_python_install_dir+set}" = set; then : - withval=$with_python_install_dir; -else - with_python_install_dir="" -fi - - if test "$with_python" = "yes"; then : with_python=$default_with_python fi @@ -12585,8 +12557,8 @@ fi continue fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PYTHON is python2 version >= 2.7 or python3 version >= 3.2" >&5 -$as_echo_n "checking if $PYTHON is python2 version >= 2.7 or python3 version >= 3.2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PYTHON is Python version >= 3.5" >&5 +$as_echo_n "checking if $PYTHON is Python version >= 3.5... " >&6; } if "$PYTHON" -c "$testminvers" 2>/dev/null; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -12597,83 +12569,12 @@ $as_echo "no" >&6; } continue fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python module 'argparse'" >&5 -$as_echo_n "checking Python module 'argparse'... " >&6; } - if "$PYTHON" -c "$testargparse" 2>/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - unset PYTHON - continue -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python module 'ply'" >&5 -$as_echo_n "checking Python module 'ply'... " >&6; } - if "$PYTHON" -c "$testply" 2>/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - unset PYTHON - continue -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python module 'distutils.core setup'" >&5 -$as_echo_n "checking Python module 'distutils.core setup'... " >&6; } - if "$PYTHON" -c "$testsetup" 2>/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - unset PYTHON - continue -fi - - # Stop looking any further once we find a Python interpreter + # Stop looking any further once we find a Python 3 interpreter # satisfying all requirements. break done - - if test "X$PYTHON" = "X"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python support" >&5 -$as_echo_n "checking for Python support... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Python >= 2.7 or >= 3.2 and the PLY package are required for dnssec-keymgr and other Python-based tools. PLY may be available from your OS package manager as python-ply or python3-ply; it can also be installed via pip. To build without Python/PLY, use --without-python." "$LINENO" 5 -fi fi -PYTHON_TOOLS='' -CHECKDS='' -COVERAGE='' -KEYMGR='' -if test "X$PYTHON" != "X"; then : - PYTHON_TOOLS=python - CHECKDS=checkds - COVERAGE=coverage - KEYMGR=keymgr - PYTHON_INSTALL_DIR="$with_python_install_dir" - if test -n "$with_python_install_dir"; then : - PYTHON_INSTALL_LIB="--install-lib=$with_python_install_dir" -fi -fi - - - - - - - -# -# expanded_sysconfdir is needed for replacement in the python utilities -# -expanded_sysconfdir=`eval echo $sysconfdir` - - # # Make sure INSTALL uses an absolute path, else it will be wrong in all # Makefiles, since they use make/rules.in and INSTALL will be adjusted by @@ -23870,7 +23771,7 @@ ac_config_commands="$ac_config_commands chmod" # elsewhere if there's a good reason for doing so. # -ac_config_files="$ac_config_files Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/python/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/Makefile bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/Makefile bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/python/isc/utils.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl fuzz/Makefile lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/netmgr/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/tests/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall make/Makefile make/mkdep unit/unittest.sh util/check-make-install" +ac_config_files="$ac_config_files Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl fuzz/Makefile lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/netmgr/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/tests/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall make/Makefile make/mkdep unit/unittest.sh util/check-make-install" # @@ -24887,27 +24788,6 @@ do "bin/nsupdate/Makefile") CONFIG_FILES="$CONFIG_FILES bin/nsupdate/Makefile" ;; "bin/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES bin/pkcs11/Makefile" ;; "bin/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES bin/plugins/Makefile" ;; - "bin/python/Makefile") CONFIG_FILES="$CONFIG_FILES bin/python/Makefile" ;; - "bin/python/dnssec-checkds.py") CONFIG_FILES="$CONFIG_FILES bin/python/dnssec-checkds.py" ;; - "bin/python/dnssec-coverage.py") CONFIG_FILES="$CONFIG_FILES bin/python/dnssec-coverage.py" ;; - "bin/python/dnssec-keymgr.py") CONFIG_FILES="$CONFIG_FILES bin/python/dnssec-keymgr.py" ;; - "bin/python/isc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/python/isc/Makefile" ;; - "bin/python/isc/__init__.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/__init__.py" ;; - "bin/python/isc/checkds.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/checkds.py" ;; - "bin/python/isc/coverage.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/coverage.py" ;; - "bin/python/isc/dnskey.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/dnskey.py" ;; - "bin/python/isc/eventlist.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/eventlist.py" ;; - "bin/python/isc/keydict.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keydict.py" ;; - "bin/python/isc/keyevent.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keyevent.py" ;; - "bin/python/isc/keymgr.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keymgr.py" ;; - "bin/python/isc/keyseries.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keyseries.py" ;; - "bin/python/isc/keyzone.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keyzone.py" ;; - "bin/python/isc/policy.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/policy.py" ;; - "bin/python/isc/rndc.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/rndc.py" ;; - "bin/python/isc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bin/python/isc/tests/Makefile" ;; - "bin/python/isc/tests/dnskey_test.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/tests/dnskey_test.py" ;; - "bin/python/isc/tests/policy_test.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/tests/policy_test.py" ;; - "bin/python/isc/utils.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/utils.py" ;; "bin/rndc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/rndc/Makefile" ;; "bin/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/Makefile" ;; "bin/tests/headerdep_test.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/headerdep_test.sh" ;; diff --git a/configure.ac b/configure.ac index 215d054c926..2526738c989 100644 --- a/configure.ac +++ b/configure.ac @@ -191,34 +191,20 @@ AC_PATH_PROGS(PERL, perl5 perl) AC_SUBST(PERL) # -# Python is also optional but required by default so that dnssec-keymgr gets -# installed unless explicitly prevented by the user using --without-python. +# Python 3 is optional; it is used by the system test scripts. # testminvers='import sys -if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): +if (sys.version_info < (3,5)): exit(1)' -testargparse='try: import argparse -except: exit(1)' - -testply='try: import ply -except: exit(1)' - -testsetup='try: from distutils.core import setup -except: exit(1)' - -default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" +default_with_python="python python3 python3.8 python3.7 python3.6 python3.5" AC_ARG_VAR([PYTHON], [path to python executable]) AC_ARG_WITH([python], AS_HELP_STRING([--with-python=PATH], - [specify path to Python interpreter]), + [specify path to Python 3 interpreter]), [], [with_python=$default_with_python]) -AC_ARG_WITH([python-install-dir], - AS_HELP_STRING([--with-python-install-dir=PATH], - [installation directory for Python modules]), - [], with_python_install_dir="") AS_IF([test "$with_python" = "yes"], [with_python=$default_with_python]) @@ -242,76 +228,17 @@ AS_IF([test "$with_python" = "no"], AS_IF([test -z "$PYTHON"], [continue]) - AC_MSG_CHECKING([if $PYTHON is python2 version >= 2.7 or python3 version >= 3.2]) + AC_MSG_CHECKING([if $PYTHON is Python version >= 3.5]) AS_IF(["$PYTHON" -c "$testminvers" 2>/dev/null], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) unset PYTHON continue]) - AC_MSG_CHECKING([Python module 'argparse']) - AS_IF(["$PYTHON" -c "$testargparse" 2>/dev/null], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - unset PYTHON - continue]) - - AC_MSG_CHECKING([Python module 'ply']) - AS_IF(["$PYTHON" -c "$testply" 2>/dev/null], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - unset PYTHON - continue]) - - AC_MSG_CHECKING([Python module 'distutils.core setup']) - AS_IF(["$PYTHON" -c "$testsetup" 2>/dev/null], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - unset PYTHON - continue]) - - # Stop looking any further once we find a Python interpreter + # Stop looking any further once we find a Python 3 interpreter # satisfying all requirements. break - done - - AS_IF([test "X$PYTHON" = "X"], - [AC_MSG_CHECKING([for Python support]) - AC_MSG_RESULT([no]) - AC_MSG_ERROR([m4_normalize( - [Python >= 2.7 or >= 3.2 and the PLY package - are required for dnssec-keymgr and other - Python-based tools. PLY may be - available from your OS package manager - as python-ply or python3-ply; it can also - be installed via pip. To build without - Python/PLY, use --without-python.] - )])])]) - -PYTHON_TOOLS='' -CHECKDS='' -COVERAGE='' -KEYMGR='' -AS_IF([test "X$PYTHON" != "X"], - [PYTHON_TOOLS=python - CHECKDS=checkds - COVERAGE=coverage - KEYMGR=keymgr - PYTHON_INSTALL_DIR="$with_python_install_dir" - AS_IF([test -n "$with_python_install_dir"], - [PYTHON_INSTALL_LIB="--install-lib=$with_python_install_dir"])]) -AC_SUBST(CHECKDS) -AC_SUBST(COVERAGE) -AC_SUBST(KEYMGR) -AC_SUBST(PYTHON_TOOLS) -AC_SUBST(PYTHON_INSTALL_DIR) -AC_SUBST(PYTHON_INSTALL_LIB) - -# -# expanded_sysconfdir is needed for replacement in the python utilities -# -expanded_sysconfdir=`eval echo $sysconfdir` -AC_SUBST(expanded_sysconfdir) + done]) # # Make sure INSTALL uses an absolute path, else it will be wrong in all @@ -2662,27 +2589,6 @@ AC_CONFIG_FILES([ bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile - bin/python/Makefile - bin/python/dnssec-checkds.py - bin/python/dnssec-coverage.py - bin/python/dnssec-keymgr.py - bin/python/isc/Makefile - bin/python/isc/__init__.py - bin/python/isc/checkds.py - bin/python/isc/coverage.py - bin/python/isc/dnskey.py - bin/python/isc/eventlist.py - bin/python/isc/keydict.py - bin/python/isc/keyevent.py - bin/python/isc/keymgr.py - bin/python/isc/keyseries.py - bin/python/isc/keyzone.py - bin/python/isc/policy.py - bin/python/isc/rndc.py - bin/python/isc/tests/Makefile - bin/python/isc/tests/dnskey_test.py - bin/python/isc/tests/policy_test.py - bin/python/isc/utils.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh diff --git a/contrib/README b/contrib/README index 466e11d1c72..15db70fe0ae 100644 --- a/contrib/README +++ b/contrib/README @@ -18,11 +18,6 @@ be fixed as time permits. Sample configuration for setting up a DNS-over-TLS server using BIND with Nginx as a TLS proxy. - - kasp/ - - Scripts for converting key and signature policies from OpenDNSSEC - KASP format to the policy.conf format used by dnssec-keymgr. - - dlz/modules Dynamically linkable DLZ modules that can be configured into diff --git a/contrib/kasp/README b/contrib/kasp/README deleted file mode 100644 index fb897f1073a..00000000000 --- a/contrib/kasp/README +++ /dev/null @@ -1,11 +0,0 @@ -This directory is for tools and scripts related to the OpenDNSSEC KASP -("key and signature policy") format. Currently it only contains -"kasp2policy.py", a python script for converting KASP key policy -to the "dnssec.policy" format that is used by dnssec-keymgr. - -This depends on PLY (python lex/yacc) and on the "isc.dnskey" module in -bin/python/isc. - -Basic test: -$ python kasp2policy.py kasp.xml > policy.out -$ diff policy.out policy.good diff --git a/contrib/kasp/kasp.xml b/contrib/kasp/kasp.xml deleted file mode 100644 index d94b0843ec6..00000000000 --- a/contrib/kasp/kasp.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - A default policy that will - amaze you and your friends - - PT5M - PT5M - - PT15M - PT15M - - PT2M - PT1M - - - - - - - - - - PT1M - PT0S - PT0S - - - - 5 - PT40M - softHSM - 1 - - - - - 5 - PT25M - softHSM - 1 - - - - - PT0S - - PT0S - PT0S - unixtime - - - - - PT8M - - PT0S - - - PT0S - PT0S - - - - - A default policy that will amaze you and your friends - - PT7M - PT7M - - PT15M - PT16M - - PT2M - PT1M - - - - - P120D - - 1 - 5 - - - - - - - - PT15M - PT0S - PT0S - - - - 7 - PT45M - softHSM - 1 - - - - - 7 - PT25M - softHSM - 1 - - - - - PT0S - - PT0S - PT0S - unixtime - - - - - PT12M - - PT0S - - - PT0S - PT0S - - - - diff --git a/contrib/kasp/kasp2policy.py b/contrib/kasp/kasp2policy.py deleted file mode 100644 index 0b54d8ab51f..00000000000 --- a/contrib/kasp/kasp2policy.py +++ /dev/null @@ -1,230 +0,0 @@ -#!/usr/bin/python -############################################################################ -# Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -# PERFORMANCE OF THIS SOFTWARE. -############################################################################ -# kasp2policy.py -# This translates the Keys section of a KASP XML file into a dnssec.policy -# file that can be used by dnssec-keymgr. -############################################################################ - -from xml.etree import cElementTree as ET -from collections import defaultdict -import re -import ply.yacc as yacc -import ply.lex as lex -from isc import dnskey - - -############################################################################ -# Translate KASP duration values into seconds -############################################################################ -class KaspTime: - # pylint: disable=invalid-name - class KTLex: - # pylint: disable=invalid-name - - tokens = ('P', 'T', 'Y', 'M', 'D', 'H', 'S', 'NUM') - - t_P = r'(?i)P' - t_T = r'(?i)T' - t_Y = r'(?i)Y' - t_M = r'(?i)M' - t_D = r'(?i)D' - t_H = r'(?i)H' - t_S = r'(?i)S' - - @staticmethod - def t_NUM(t): - r'\d+' - t.value = int(t.value) - return t - - @staticmethod - def t_error(t): - print("Illegal character '%s'" % t.value[0]) - t.lexer.skip(1) - - def __init__(self): - self.lexer = lex.lex(object=self) - - def __init__(self): - self.lexer = self.KTLex() - self.tokens = self.lexer.tokens - self.parser = yacc.yacc(debug=False, write_tables=False, module=self) - - def parse(self, text): - self.lexer.lexer.lineno = 0 - return self.parser.parse(text) - - @staticmethod - def p_ktime_4(p): - "ktime : P periods T times" - p[0] = p[2] + p[4] - - @staticmethod - def p_ktime_3(p): - "ktime : P T times" - p[0] = p[3] - - @staticmethod - def p_ktime_2(p): - "ktime : P periods" - p[0] = p[2] - - @staticmethod - def p_periods_1(p): - "periods : period" - p[0] = p[1] - - @staticmethod - def p_periods_2(p): - "periods : periods period" - p[0] = p[1] + p[2] - - @staticmethod - def p_times_1(p): - "times : time" - p[0] = p[1] - - @staticmethod - def p_times_2(p): - "times : times time" - p[0] = p[1] + p[2] - - @staticmethod - def p_period(p): - '''period : NUM Y - | NUM M - | NUM D''' - if p[2].lower() == 'y': - p[0] = int(p[1]) * 31536000 - elif p[2].lower() == 'm': - p[0] = int(p[1]) * 2592000 - elif p[2].lower() == 'd': - p[0] += int(p[1]) * 86400 - - @staticmethod - def p_time(p): - '''time : NUM H - | NUM M - | NUM S''' - if p[2].lower() == 'h': - p[0] = int(p[1]) * 3600 - elif p[2].lower() == 'm': - p[0] = int(p[1]) * 60 - elif p[2].lower() == 's': - p[0] = int(p[1]) - - @staticmethod - def p_error(): - print("Syntax error") - - -############################################################################ -# Load the contents of a KASP XML file as a python dictionary -############################################################################ -class Kasp(): - # pylint: disable=invalid-name - - @staticmethod - def _todict(t): - d = {t.tag: {} if t.attrib else None} - children = list(t) - if children: - dd = defaultdict(list) - for dc in map(Kasp._todict, children): - for k, v in dc.iteritems(): - dd[k].append(v) - k = {k: v[0] if len(v) == 1 else v for k, v in dd.items()} - d = {t.tag: k} - if t.attrib: - d[t.tag].update(('@' + k, v) for k, v in t.attrib.iteritems()) - if t.text: - text = t.text.strip() - if children or t.attrib: - if text: - d[t.tag]['#text'] = text - else: - d[t.tag] = text - return d - - def __init__(self, filename): - self._dict = Kasp._todict(ET.parse(filename).getroot()) - - def __getitem__(self, key): - return self._dict[key] - - def __len__(self): - return len(self._dict) - - def __iter__(self): - return self._dict.__iter__() - - def __repr__(self): - return repr(self._dict) - - -############################################################################ -# Load the contents of a KASP XML file as a python dictionary -############################################################################ -if __name__ == "__main__": - import sys - - if len(sys.argv) < 2: - print("Usage: kasp2policy ") - sys.exit(1) - - KINFO = Kasp(sys.argv[1]) - try: - KINFO = Kasp(sys.argv[1]) - except FileNotFoundError: - print("%s: unable to load KASP file '%s'" % (sys.argv[0], sys.argv[1])) - sys.exit(1) - - KT = KaspTime() - FIRST = True - - for policy in KINFO['KASP']['Policy']: - if not policy['@name'] or not policy['Keys']: - continue - if not FIRST: - print("") - FIRST = False - if policy['Description']: - desc = policy['Description'].strip() - print("# %s" % re.sub(r"\n\s*", "\n# ", desc)) - print("policy %s {" % policy['@name']) - ksk = policy['Keys']['KSK'] - zsk = policy['Keys']['ZSK'] - kalg = ksk['Algorithm'] - zalg = zsk['Algorithm'] - algnum = kalg['#text'] or zalg['#text'] - if algnum: - print("\talgorithm %s;" % dnskey.algstr(int(algnum))) - if policy['Keys']['TTL']: - print("\tkeyttl %d;" % KT.parse(policy['Keys']['TTL'])) - if kalg['@length']: - print("\tkey-size ksk %d;" % int(kalg['@length'])) - if zalg['@length']: - print("\tkey-size zsk %d;" % int(zalg['@length'])) - if ksk['Lifetime']: - print("\troll-period ksk %d;" % KT.parse(ksk['Lifetime'])) - if zsk['Lifetime']: - print("\troll-period zsk %d;" % KT.parse(zsk['Lifetime'])) - if ksk['Standby']: - print("\tstandby ksk %d;" % int(ksk['Standby'])) - if zsk['Standby']: - print("\tstandby zsk %d;" % int(zsk['Standby'])) - print("};") diff --git a/contrib/kasp/policy.good b/contrib/kasp/policy.good deleted file mode 100644 index 18c636083ce..00000000000 --- a/contrib/kasp/policy.good +++ /dev/null @@ -1,24 +0,0 @@ -# A default policy that will -# amaze you and your friends -policy Policy1 { - algorithm RSASHA1; - keyttl 60; - key-size ksk 2048; - key-size zsk 2048; - roll-period ksk 2400; - roll-period zsk 1500; - standby ksk 1; - standby zsk 1; -}; - -# A default policy that will amaze you and your friends -policy Policy2 { - algorithm NSEC3RSASHA1; - keyttl 900; - key-size ksk 2048; - key-size zsk 2048; - roll-period ksk 2700; - roll-period zsk 1500; - standby ksk 1; - standby zsk 1; -}; diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index e291dc88d0d..8af38b586cc 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -18553,13 +18553,10 @@ allow-query { !{ !10/8; any; }; key example; }; - - - diff --git a/doc/arm/man.dnssec-checkds.html b/doc/arm/man.dnssec-checkds.html deleted file mode 100644 index cbb152cfea3..00000000000 --- a/doc/arm/man.dnssec-checkds.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - -dnssec-checkds - - - - - - - - -
-
- - - - - -
-

Name

-

- dnssec-checkds - — DNSSEC delegation consistency checking tool -

-
- - - -
-

Synopsis

-

- dnssec-checkds - [-d dig path] - [-D dsfromkey path] - [-f file] - [-l domain] - [-s file] - {zone} -

-
- -
-

DESCRIPTION

- -

dnssec-checkds - verifies the correctness of Delegation Signer (DS) - resource records for keys in a specified zone. -

-
- -
-

OPTIONS

- -
-
-a algorithm
-
-

- Specify a digest algorithm to use when converting the - zone's DNSKEY records to expected DS records. This - option can be repeated, so that multiple records are - checked for each DNSKEY record. -

-

- The algorithm must be one of - SHA-1, SHA-256, or SHA-384. These values are case insensitive, - and the hyphen may be omitted. If no algorithm is specified, - the default is SHA-256. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file to find the DNSKEY records. If not, - then the DNSKEY records for the zone are looked up in the DNS. -

-
-
-s file
-
-

- Specifies a prepared dsset file, such as would be generated - by dnssec-signzone, to use as a source for - the DS RRset instead of querying the parent. -

-
-
-d dig path
-
-

- Specifies a path to a dig binary. Used - for testing. -

-
-
-D dsfromkey path
-
-

- Specifies a path to a dnssec-dsfromkey binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - , -

-
- -
- -

BIND 9.17.1 (Development Release)

- - diff --git a/doc/arm/man.dnssec-coverage.html b/doc/arm/man.dnssec-coverage.html deleted file mode 100644 index 3c4f3518975..00000000000 --- a/doc/arm/man.dnssec-coverage.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - -dnssec-coverage - - - - - - - - -
-
- - - - - -
-

Name

-

- dnssec-coverage - — checks future DNSKEY coverage for a zone -

-
- - - -
-

Synopsis

-

- dnssec-coverage - [-K directory] - [-l length] - [-f file] - [-d DNSKEY TTL] - [-m max TTL] - [-r interval] - [-c compilezone path] - [-k] - [-z] - [zone...] -

-
- -
-

DESCRIPTION

- -

dnssec-coverage - verifies that the DNSSEC keys for a given zone or a set of zones - have timing metadata set properly to ensure no future lapses in DNSSEC - coverage. -

-

- If zone is specified, then keys found in - the key repository matching that zone are scanned, and an ordered - list is generated of the events scheduled for that key (i.e., - publication, activation, inactivation, deletion). The list of - events is walked in order of occurrence. Warnings are generated - if any event is scheduled which could cause the zone to enter a - state in which validation failures might occur: for example, if - the number of published or active keys for a given algorithm drops - to zero, or if a key is deleted from the zone too soon after a new - key is rolled, and cached data signed by the prior key has not had - time to expire from resolver caches. -

-

- If zone is not specified, then all keys in the - key repository will be scanned, and all zones for which there are - keys will be analyzed. (Note: This method of reporting is only - accurate if all the zones that have keys in a given repository - share the same TTL parameters.) -

-
- -
-

OPTIONS

- - -
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file; the largest TTL and the DNSKEY TTL are - determined directly from the zone data, and the - -m and -d options do - not need to be specified on the command line. -

-
-
-l duration
-
-

- The length of time to check for DNSSEC coverage. Key events - scheduled further into the future than duration - will be ignored, and assumed to be correct. -

-

- The value of duration can be set in seconds, - or in larger units of time by adding a suffix: 'mi' for minutes, - 'h' for hours, 'd' for days, 'w' for weeks, 'mo' for months, - 'y' for years. -

-
-
-m maximum TTL
-
-

- Sets the value to be used as the maximum TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a zone-signing key is - deactivated, there must be enough time for the record in the - zone with the longest TTL to have expired from resolver caches - before that key can be purged from the DNSKEY RRset. If that - condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if the -f has - been used to specify a zone file. If -f has - been specified, this option may still be used; it will override - the value found in the file. -

-

- If this option is not used and the maximum TTL cannot be retrieved - from a zone file, a warning is generated and a default value of - 1 week is used. -

-
-
-d DNSKEY TTL
-
-

- Sets the value to be used as the DNSKEY TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a key is rolled (that - is, replaced with a new key), there must be enough time for the - old DNSKEY RRset to have expired from resolver caches before - the new key is activated and begins generating signatures. If - that condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if -f has - been used to specify a zone file from which the TTL - of the DNSKEY RRset can be read, or if a default key TTL was - set using ith the -L to - dnssec-keygen. If either of those is true, - this option may still be used; it will override the values - found in the zone file or the key file. -

-

- If this option is not used and the key TTL cannot be retrieved - from the zone file or the key file, then a warning is generated - and a default value of 1 day is used. -

-
-
-r resign interval
-
-

- Sets the value to be used as the resign interval for the zone - or zones being analyzed when determining whether there is a - possibility of validation failure. This value defaults to - 22.5 days, which is also the default in - named. However, if it has been changed - by the sig-validity-interval option in - named.conf, then it should also be - changed here. -

-

- The length of the interval can be set in seconds, or in larger - units of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-
-
-k
-
-

- Only check KSK coverage; ignore ZSK events. Cannot be - used with -z. -

-
-
-z
-
-

- Only check ZSK coverage; ignore KSK events. Cannot be - used with -k. -

-
-
-c compilezone path
-
-

- Specifies a path to a named-compilezone binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- - dnssec-checkds(8) - , - - dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - -

-
- -
- -

BIND 9.17.1 (Development Release)

- - diff --git a/doc/arm/man.dnssec-keymgr.html b/doc/arm/man.dnssec-keymgr.html deleted file mode 100644 index 8b3b952ac86..00000000000 --- a/doc/arm/man.dnssec-keymgr.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - -dnssec-keymgr - - - - - - - - -
-
- - - - - -
-

Name

-

- dnssec-keymgr - — Ensures correct DNSKEY coverage for a zone based on a defined policy -

-
- - - -
-

Synopsis

-

- dnssec-keymgr - [-K directory] - [-c file] - [-f] - [-k] - [-q] - [-v] - [-z] - [-g path] - [-s path] - [zone...] -

-
- -
-

DESCRIPTION

-

- dnssec-keymgr is a high level Python wrapper - to facilitate the key rollover process for zones handled by - BIND. It uses the BIND commands for manipulating DNSSEC key - metadata: dnssec-keygen and - dnssec-settime. -

-

- DNSSEC policy can be read from a configuration file (default - /etc/dnssec-policy.conf), from which the - key parameters, publication and rollover schedule, and desired - coverage duration for any given zone can be determined. This - file may be used to define individual DNSSEC policies on a - per-zone basis, or to set a "default" policy - used for all zones. -

-

- When dnssec-keymgr runs, it examines the DNSSEC - keys for one or more zones, comparing their timing metadata against - the policies for those zones. If key settings do not conform to the - DNSSEC policy (for example, because the policy has been changed), - they are automatically corrected. -

-

- A zone policy can specify a duration for which we want to - ensure the key correctness (coverage). It can - also specify a rollover period (roll-period). - If policy indicates that a key should roll over before the - coverage period ends, then a successor key will automatically be - created and added to the end of the key series. -

-

- If zones are specified on the command line, - dnssec-keymgr will examine only those zones. - If a specified zone does not already have keys in place, then - keys will be generated for it according to policy. -

-

- If zones are not specified on the command - line, then dnssec-keymgr will search the - key directory (either the current working directory or the directory - set by the -K option), and check the keys for - all the zones represented in the directory. -

-

- Key times that are in the past will not be updated unless - the -f is used (see below). Key inactivation - and deletion times that are less than five minutes in the future - will be delayed by five minutes. -

-

- It is expected that this tool will be run automatically and - unattended (for example, by cron). -

-
- -
-

OPTIONS

-
-
-c file
-
-

- If -c is specified, then the DNSSEC - policy is read from file. (If not - specified, then the policy is read from - /etc/dnssec-policy.conf; if that file - doesn't exist, a built-in global default policy is used.) -

-
-
-f
-
-

- Force: allow updating of key events even if they are - already in the past. This is not recommended for use with - zones in which keys have already been published. However, - if a set of keys has been generated all of which have - publication and activation dates in the past, but the - keys have not been published in a zone as yet, then this - option can be used to clean them up and turn them into a - proper series of keys with appropriate rollover intervals. -

-
-
-g keygen-path
-
-

- Specifies a path to a dnssec-keygen binary. - Used for testing. - See also the -s option. -

-
-
-h
-
-

- Print the dnssec-keymgr help summary - and exit. -

-
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-k
-
-

- Only apply policies to KSK keys. - See also the -z option. -

-
-
-q
-
-

- Quiet: suppress printing of dnssec-keygen - and dnssec-settime. -

-
-
-s settime-path
-
-

- Specifies a path to a dnssec-settime binary. - Used for testing. - See also the -g option. -

-
-
-v
-
-

- Print the dnssec-keymgr version and exit. -

-
-
-z
-
-

- Only apply policies to ZSK keys. - See also the -k option. -

-
-
-
- -
-

POLICY CONFIGURATION

-

- The dnssec-policy.conf file can specify three kinds - of policies: -

-
    -
  • -

    - Policy classes - (policy name { ... };) - can be inherited by zone policies or other policy classes; these - can be used to create sets of different security profiles. For - example, a policy class normal might specify - 1024-bit key sizes, but a class extra might - specify 2048 bits instead; extra would be - used for zones that had unusually high security needs. -

    -
  • -
  • -

    - Algorithm policies: - (algorithm-policy algorithm { ... }; ) - override default per-algorithm settings. For example, by default, - RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This - can be modified using algorithm-policy, and the - new key sizes would then be used for any key of type RSASHA256. -

    -
  • -
  • -

    - Zone policies: - (zone name { ... }; ) - set policy for a single zone by name. A zone policy can inherit - a policy class by including a policy option. - Zone names beginning with digits (i.e., 0-9) must be quoted. - If a zone does not have its own policy then the - "default" policy applies. -

    -
  • -
-

- Options that can be specified in policies: -

-
-
algorithm - name;
-
-

- The key algorithm. If no policy is defined, the default is - RSASHA256. -

-
-
coverage - duration;
-
-

- The length of time to ensure that keys will be correct; no action - will be taken to create new keys to be activated after this time. - This can be represented as a number of seconds, or as a duration - using human-readable units (examples: "1y" or "6 months"). - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. - If no policy is configured, the default is six months. -

-
-
directory - path;
-
-

- Specifies the directory in which keys should be stored. -

-
-
key-size keytype - size;
-
-

- Specifies the number of bits to use in creating keys. - The keytype is either "zsk" or "ksk". - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is 2048 bits for RSA keys. -

-
-
keyttl - duration;
-
-

- The key TTL. If no policy is defined, the default is one hour. -

-
-
post-publish keytype - duration;
-
-

- How long after inactivation a key should be deleted from the zone. - Note: If roll-period is not set, this value is - ignored. The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm - policies as well as in policy classes or zone policies. The default - is one month. -

-
-
pre-publish keytype - duration;
-
-

- How long before activation a key should be published. Note: If - roll-period is not set, this value is ignored. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. The default is - one month. -

-
-
roll-period keytype - duration;
-
-

- How frequently keys should be rolled over. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is one year for ZSKs. KSKs do not - roll over by default. -

-
-
standby keytype - number;
-
-

- Not yet implemented. -

-
-
-
- -
-

REMAINING WORK

-
    -
  • -

    - Enable scheduling of KSK rollovers using the -P sync - and -D sync options to - dnssec-keygen and - dnssec-settime. Check the parent zone - (as in dnssec-checkds) to determine when it's - safe for the key to roll. -

    -
  • -
  • -

    - Allow configuration of standby keys and use of the REVOKE bit, - for keys that use RFC 5011 semantics. -

    -
  • -
-
- -
-

SEE ALSO

-

- - dnssec-coverage(8) - , - - dnssec-keygen(8) - , - - dnssec-settime(8) - , - - dnssec-checkds(8) - -

-
- -
- -

BIND 9.17.1 (Development Release)

- - diff --git a/doc/design/dnssec-policy b/doc/design/dnssec-policy index d36060efe31..376019b5ba1 100644 --- a/doc/design/dnssec-policy +++ b/doc/design/dnssec-policy @@ -168,18 +168,6 @@ dnssec-policy "nsec3" { # KASP design -## dnssec-policy versus dnssec-keymgr - -Key management in BIND 9 is currently implemented with a Python script -called `dnssec-keymgr`. It uses the DNSSEC tools for manipulating DNSSEC key -metadata. - -With `dnssec-policy` configured in `named.conf` you no longer need to manually -call `dnssec-keymgr` or the tools it wraps around, `dnssec-keygen` and -`dnssec-settime` (although it is still possible to use them). The policy in -`named.conf` will make `named` create keys when necessary and set the key -timings accordingly. - ## Key roles BIND 9.14 allows sign your zones with a Zone Signing Key (ZSK) and a diff --git a/doc/dev/dev.md b/doc/dev/dev.md index 955805d0dfe..ba4f5307212 100644 --- a/doc/dev/dev.md +++ b/doc/dev/dev.md @@ -248,8 +248,6 @@ libraries. `dnssec-keygen`, `dnssec-signzone`, `dnssec-settime`, `dnssec-revoke`, `dnssec-keyfromlabel`, `dnssec-dsfromkey`, `dnssec-verify` (BIND 9.9+) - * `bind9/bin/python` (BIND 9.9+): tools written in python. Currently - has `dnssec-checkds` and `dnssec-coverage` * `bind9/bin/rndc`: `rndc` binary * `bind9/bin/dig`: `dig`, `host`, and `nslookup` * `bind9/bin/delv`: `delv` diff --git a/lib/isc/win32/libisc.vcxproj.in b/lib/isc/win32/libisc.vcxproj.in index 0aa9733b277..b9c09da842b 100644 --- a/lib/isc/win32/libisc.vcxproj.in +++ b/lib/isc/win32/libisc.vcxproj.in @@ -219,11 +219,6 @@ copy ..\bin\dnssec\dnssec-settime.html ..\Build\Release copy ..\bin\dnssec\dnssec-revoke.html ..\Build\Release copy ..\bin\dnssec\dnssec-verify.html ..\Build\Release copy ..\bin\dnssec\dnssec-importkey.html ..\Build\Release -@IF PYTHON -copy ..\bin\python\dnssec-checkds.html ..\Build\Release -copy ..\bin\python\dnssec-coverage.html ..\Build\Release -copy ..\bin\python\dnssec-keymgr.html ..\Build\Release -@END PYTHON @IF PKCS11 copy ..\bin\pkcs11\pkcs11-keygen.html ..\Build\Release copy ..\bin\pkcs11\pkcs11-list.html ..\Build\Release diff --git a/util/copyrights b/util/copyrights index 503b1d8b59a..52f9588a67f 100644 --- a/util/copyrights +++ b/util/copyrights @@ -134,7 +134,6 @@ ./bin/dnssec/win32/dnssectool.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dnssec/win32/dnssectool.vcxproj.user X 2013,2018,2019,2020 ./bin/dnssec/win32/dsfromkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/dsfromkey.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dnssec/win32/dsfromkey.vcxproj.user X 2013,2018,2019,2020 ./bin/dnssec/win32/importkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/dnssec/win32/importkey.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 @@ -248,41 +247,6 @@ ./bin/plugins/filter-aaaa.c C 2018,2019,2020 ./bin/plugins/filter-aaaa.docbook SGML 2018,2019,2020 ./bin/plugins/filter-aaaa.html HTML DOCBOOK -./bin/python/dnssec-checkds.8 MAN DOCBOOK -./bin/python/dnssec-checkds.docbook SGML 2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/dnssec-checkds.html HTML DOCBOOK -./bin/python/dnssec-checkds.py.in PYTHON-BIN 2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/dnssec-coverage.8 MAN DOCBOOK -./bin/python/dnssec-coverage.docbook SGML 2013,2014,2015,2016,2018,2019,2020 -./bin/python/dnssec-coverage.html HTML DOCBOOK -./bin/python/dnssec-coverage.py.in PYTHON-BIN 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/dnssec-keymgr.8 MAN DOCBOOK -./bin/python/dnssec-keymgr.docbook SGML 2016,2017,2018,2019,2020 -./bin/python/dnssec-keymgr.html HTML DOCBOOK -./bin/python/dnssec-keymgr.py.in PYTHON-BIN 2016,2017,2018,2019,2020 -./bin/python/isc/__init__.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/checkds.py.in PYTHON 2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/isc/coverage.py.in PYTHON 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/isc/dnskey.py.in PYTHON 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/isc/eventlist.py.in PYTHON 2015,2016,2018,2019,2020 -./bin/python/isc/keydict.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/keyevent.py.in PYTHON 2013,2014,2015,2016,2018,2019,2020 -./bin/python/isc/keymgr.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/keyseries.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/keyzone.py.in PYTHON 2013,2014,2015,2016,2018,2019,2020 -./bin/python/isc/policy.py.in PYTHON 2016,2017,2018,2019,2020 -./bin/python/isc/rndc.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/tests/dnskey_test.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/tests/policy_test.py.in PYTHON 2016,2017,2018,2019,2020 -./bin/python/isc/tests/test-policies/01-keysize.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/02-prepublish.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/03-postpublish.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/04-combined-pre-post.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/05-numeric-zone.pol X 2017,2018,2019,2020 -./bin/python/isc/tests/testdata/Kexample.com.+007+35529.key X 2016,2018,2019,2020 -./bin/python/isc/tests/testdata/Kexample.com.+007+35529.private X 2016,2018,2019,2020 -./bin/python/isc/utils.py.in PYTHON 2016,2018,2019,2020 -./bin/python/setup.py PYTHON 2016,2018,2019,2020 ./bin/rndc/include/rndc/os.h C 2001,2004,2005,2007,2009,2016,2018,2019,2020 ./bin/rndc/rndc.8 MAN DOCBOOK ./bin/rndc/rndc.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -423,21 +387,6 @@ ./bin/tests/system/checkconf/dnssec.3 X 2011,2016,2017,2018,2019,2020 ./bin/tests/system/checkconf/good.zonelist X 2016,2017,2018,2019,2020 ./bin/tests/system/checkconf/tests.sh SH 2005,2007,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/clean.sh SH 2012,2013,2014,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/dig.bat BAT 2016,2018,2019,2020 -./bin/tests/system/checkds/dig.pl PERL 2014,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/dig.sh SH 2012,2013,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/missing.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/missing.example.ds.db X 2012,2018,2019 -./bin/tests/system/checkds/none.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/none.example.ds.db X 2012,2018,2019 -./bin/tests/system/checkds/ok.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/ok.example.ds.db X 2012,2018,2019 -./bin/tests/system/checkds/prep.example.db X 2017,2018,2019 -./bin/tests/system/checkds/prep.example.ds.db X 2017,2018,2019 -./bin/tests/system/checkds/tests.sh SH 2012,2013,2014,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/wrong.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/wrong.example.ds.db X 2012,2018,2019 ./bin/tests/system/checknames/clean.sh SH 2004,2007,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/checknames/setup.sh SH 2004,2007,2012,2014,2016,2018,2019,2020 ./bin/tests/system/checknames/tests.sh SH 2004,2007,2012,2013,2014,2015,2016,2018,2019,2020 @@ -454,33 +403,6 @@ ./bin/tests/system/cookie/clean.sh SH 2014,2015,2016,2018,2019,2020 ./bin/tests/system/cookie/setup.sh SH 2018,2019,2020 ./bin/tests/system/cookie/tests.sh SH 2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/coverage/01-ksk-inactive/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/01-ksk-inactive/expect X 2013,2018,2019,2020 -./bin/tests/system/coverage/02-zsk-inactive/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/02-zsk-inactive/expect X 2013,2018,2019,2020 -./bin/tests/system/coverage/03-ksk-unpublished/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/03-ksk-unpublished/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/04-zsk-unpublished/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/04-zsk-unpublished/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/05-ksk-unpub-active/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/05-ksk-unpub-active/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/06-zsk-unpub-active/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/06-zsk-unpub-active/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/07-ksk-ttl/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/07-ksk-ttl/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/08-zsk-ttl/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/08-zsk-ttl/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/09-check-zsk/README X 2014,2018,2019,2020 -./bin/tests/system/coverage/09-check-zsk/expect X 2014,2018,2019,2020 -./bin/tests/system/coverage/10-check-ksk/README X 2014,2018,2019,2020 -./bin/tests/system/coverage/10-check-ksk/expect X 2014,2018,2019,2020 -./bin/tests/system/coverage/11-cutoff/README X 2014,2018,2019,2020 -./bin/tests/system/coverage/11-cutoff/expect X 2014,2018,2019,2020 -./bin/tests/system/coverage/12-ksk-deletion/expect X 2018,2019,2020 -./bin/tests/system/coverage/13-dotted-dotless/expect X 2019,2020 -./bin/tests/system/coverage/clean.sh SH 2013,2014,2016,2018,2019,2020 -./bin/tests/system/coverage/setup.sh SH 2013,2014,2016,2017,2018,2019,2020 -./bin/tests/system/coverage/tests.sh SH 2013,2014,2016,2018,2019,2020 ./bin/tests/system/database/clean.sh SH 2011,2012,2014,2016,2018,2019,2020 ./bin/tests/system/database/setup.sh SH 2011,2012,2016,2018,2019,2020 ./bin/tests/system/database/tests.sh SH 2011,2012,2016,2018,2019,2020 @@ -706,51 +628,6 @@ ./bin/tests/system/keepalive/expected X 2017,2018,2019,2020 ./bin/tests/system/keepalive/setup.sh SH 2017,2018,2019,2020 ./bin/tests/system/keepalive/tests.sh SH 2017,2018,2019,2020 -./bin/tests/system/keymgr/01-ksk-inactive/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/01-ksk-inactive/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/02-zsk-inactive/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/02-zsk-inactive/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/03-ksk-unpublished/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/03-ksk-unpublished/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/04-zsk-unpublished/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/04-zsk-unpublished/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/05-ksk-unpub-active/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/05-ksk-unpub-active/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/06-zsk-unpub-active/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/06-zsk-unpub-active/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/07-ksk-ttl/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/07-ksk-ttl/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/08-zsk-ttl/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/08-zsk-ttl/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/09-no-keys/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/09-no-keys/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/10-change-roll/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/10-change-roll/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/11-many-simul/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/11-many-simul/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/12-many-active/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/12-many-active/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/13-noroll/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/13-noroll/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/14-wrongalg/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/14-wrongalg/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/15-unspec/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/15-unspec/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/16-wrongalg-unspec/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/16-wrongalg-unspec/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/17-noforce/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/17-noforce/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/18-nonstd-prepub/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/18-nonstd-prepub/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/19-old-keys/README TXT.BRIEF 2019,2020 -./bin/tests/system/keymgr/19-old-keys/expect X 2019,2020 -./bin/tests/system/keymgr/19-old-keys/extra.sh SH 2019,2020 -./bin/tests/system/keymgr/clean.sh SH 2016,2018,2019,2020 -./bin/tests/system/keymgr/policy.good X 2016,2018,2019,2020 -./bin/tests/system/keymgr/policy.sample X 2016,2017,2018,2019,2020 -./bin/tests/system/keymgr/setup.sh SH 2016,2017,2018,2019,2020 -./bin/tests/system/keymgr/testpolicy.py PYTHON 2016,2018,2019,2020 -./bin/tests/system/keymgr/tests.sh SH 2016,2018,2019,2020 ./bin/tests/system/legacy/build.sh SH 2014,2016,2017,2018,2019,2020 ./bin/tests/system/legacy/clean.sh SH 2014,2016,2018,2019,2020 ./bin/tests/system/legacy/ns1/trusted.conf X 2014,2018,2019 @@ -1385,10 +1262,6 @@ ./contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c X 2013,2015,2016,2018,2019,2020 ./contrib/dlz/modules/wildcard/testing/named.conf X 2013,2018,2019 ./contrib/dnspriv/nginx.conf SH 2017,2018,2019 -./contrib/kasp/README X 2016,2018,2019,2020 -./contrib/kasp/kasp.xml X 2016,2018,2019,2020 -./contrib/kasp/kasp2policy.py X 2016,2018,2019,2020 -./contrib/kasp/policy.good X 2016,2018,2019,2020 ./contrib/scripts/catzhash.py X 2020 ./contrib/scripts/check-secure-delegation.pl.in PERL 2010,2012,2014,2016,2018,2019,2020 ./contrib/scripts/check5011.pl X 2013,2014,2017,2018,2019,2020 @@ -1434,13 +1307,10 @@ ./doc/arm/man.delv.html X 2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dig.html X 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-cds.html X 2017,2018,2019,2020 -./doc/arm/man.dnssec-checkds.html X 2013,2014,2015,2016,2017,2018,2019,2020 -./doc/arm/man.dnssec-coverage.html X 2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-dsfromkey.html X 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-importkey.html X 2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-keyfromlabel.html X 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-keygen.html X 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./doc/arm/man.dnssec-keymgr.html X 2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-revoke.html X 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-settime.html X 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-signzone.html X 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 diff --git a/win32utils/Configure b/win32utils/Configure index dc403e32e99..d3c839540ca 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -25,25 +25,7 @@ my $configfile = "..\\config.h"; my $platformfile = "..\\lib\\isc\\win32\\include\\isc\\platform.h"; my $confshfile = "..\\bin\\tests\\system\\conf.sh"; -my @filelist = ("..\\bin\\python\\dnssec-checkds.py", - "..\\bin\\python\\dnssec-coverage.py", - "..\\bin\\python\\dnssec-keymgr.py", - "..\\bin\\python\\isc\\__init__.py", - "..\\bin\\python\\isc\\checkds.py", - "..\\bin\\python\\isc\\coverage.py", - "..\\bin\\python\\isc\\dnskey.py", - "..\\bin\\python\\isc\\eventlist.py", - "..\\bin\\python\\isc\\keydict.py", - "..\\bin\\python\\isc\\keyevent.py", - "..\\bin\\python\\isc\\keymgr.py", - "..\\bin\\python\\isc\\keyseries.py", - "..\\bin\\python\\isc\\keyzone.py", - "..\\bin\\python\\isc\\policy.py", - "..\\bin\\python\\isc\\rndc.py", - "..\\bin\\python\\isc\\tests\\dnskey_test.py", - "..\\bin\\python\\isc\\tests\\policy_test.py", - "..\\bin\\python\\isc\\utils.py", - "..\\lib\\dns\\win32\\libdns.def", +my @filelist = ("..\\lib\\dns\\win32\\libdns.def", "..\\lib\\isc\\win32\\libisc.def"); my @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj", @@ -236,13 +218,10 @@ my @substdefp = (); my %configtest; -my @substtest = ("CHECKDS", - "COVERAGE", - "CRYPTO", +my @substtest = ("CRYPTO", "DNSTAP", "FSTRM_CAPTURE", "JSONSTATS", - "KEYMGR", "NZD_TOOLS", "XMLSTATS", "ZLIB"), @@ -307,7 +286,6 @@ my @substvar = ("BIND9_VERSION", "COPTY", "DLZ_SYSTEM_TEST", "EXEEXT", - "expanded_sysconfdir", "INTRINSIC", "MACHINE", "OPENSSL_PATH", @@ -317,7 +295,6 @@ my @substvar = ("BIND9_VERSION", "prefix", "PSSUSPEND", "PYTHON", - "PYTHON_INSTALL_DIR", "TOOLS_VERSION", "VCREDIST_PATH", "WINDOWS_TARGET_PLATFORM_VERSION"), @@ -1996,73 +1973,12 @@ if ($use_python ne "no") { if ($python_command !~ /\.exe$/i) { $python_command = $python_command . ".exe"; } - # tried to use the full path without success here - if ($verbose) { - print "checking for python module 'argparse'\n"; - } - my $pythonret = `"$python_command" -c "import argparse" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'argparse': $pythonret\n"; - } else { - print STDERR "can't find python module 'argparse': $pythonret\n"; - $use_python = "no"; - } - } - if ($use_python ne "no") { - if ($verbose) { - print "checking for python module 'ply'\n"; - } - $pythonret = `"$python_command" -c "from ply import *" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'ply': $pythonret\n"; - } else { - print STDERR "can't find python module 'ply': $pythonret\n"; - $use_python = "no"; - } - } - } - if ($use_python ne "no") { - if ($verbose) { - print "checking for python module 'win32api'\n"; - } - $pythonret = `"$python_command" -c "import win32api" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'win32api': $pythonret\n"; - } else { - print STDERR - "can't find python module 'win32api': $pythonret\n"; - $use_python = "no"; - } - } - } - if ($use_python ne "no") { - if ($verbose) { - print "checking for python module 'win32con'\n"; - } - $pythonret = `"$python_command" -c "import win32con" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'win32con': $pythonret\n"; - } else { - print STDERR - "can't find python module 'win32con': $pythonret\n"; - $use_python = "no"; - } - } - } if ($use_python ne "no") { $configcond{"PYTHON"} = 1; $configdefd{"USE_PYTHON"} = "USE_PYTHON"; $configvar{"PYTHON"} = "$python_command"; - $configtest{"CHECKDS"} = "checkds"; - $configtest{"COVERAGE"} = "coverage"; - $configtest{"KEYMGR"} = "keymgr"; # Doesn't matter $configvar{"prefix"} = "__prefix__"; - $configvar{"expanded_sysconfdir"} = "__prefix__\\etc"; } } @@ -2711,11 +2627,6 @@ sub makeinstallfile { print LOUT "pkcs11-list.exe-BNFF\n"; print LOUT "pkcs11-tokens.exe-BNFF\n"; } - if ($use_python ne "no") { - print LOUT "dnssec-checkds.py-BNFF\n"; - print LOUT "dnssec-coverage.py-BNFF\n"; - print LOUT "dnssec-keymgr.py-BNFF\n"; - } print LOUT "readme1st.txt-BTFT\n"; close LOUT; } diff --git a/win32utils/build.txt b/win32utils/build.txt index 22d0a631650..35ce02d5c5a 100644 --- a/win32utils/build.txt +++ b/win32utils/build.txt @@ -25,9 +25,6 @@ If you wish to use zlib/deflate on the statistics channel, zlib must be downloaded and built on the system on which you are building BIND 9. -If you wish to use python tools, you need a python (version 2 or 3) -interpreter with its standard libraries. - If you wish to use readline, the readline library must be downloaded and built on the system on which you are building BIND 9. @@ -130,25 +127,7 @@ Step 5: Download and build GeoIP This patch has been submitted upstream, and will be included in future versions of libGeoIP. -Step 6: Enable python tools - - Some python packages are required: argparse, ply, win32con and win32api. - Last CPython's (version 2 or 3) from https://www.python.org include - the pip package manager which can install missing packages, for - instance for the 2 last packages 'pip install pypiwin32' downloads and - installs win32con and win32api. - - Note when the python interpreter is in the command path and - the required packages available the Configure script will detect - them and add python tools to the BIND 9 build. - - To be used a python tool must be invoked with python (e.g., - python dnssec-checkds.py ) as the shebang doesn't work - on Windows. The isc package should be installed too, cf step 12. - Unlike on Unix systems, this isc package uses the Registry to - learn where BIND 9 was installed in step 11. - -Step 7: Download and build Readline +Step 6: Download and build Readline The readline library adds command-line editing in nslookup and nsupdate. If you wish to build BIND 9 without support for this feature, skip to @@ -164,7 +143,7 @@ Step 7: Download and build Readline Note: Windows command (cmd.exe) provides an integrated line editing feature so it is not recommended to configure bind with readline. -Step 8: Make the redistributable runtime object available +Step 7: Make the redistributable runtime object available Check that the Microsoft redistributable object (vcredist_x86.exe or vcredist_x64.exe) is available to the build. The file may be placed @@ -176,7 +155,7 @@ Step 8: Make the redistributable runtime object available step 9). If none of these options is used, Configure will attempt to find the redistributable based on clues in the build environment. -Step 9: Configuring the BIND 9 build +Step 8: Configuring the BIND 9 build From the command prompt, cd to the win32utils directory under the BIND 9 root: @@ -196,7 +175,7 @@ Step 9: Configuring the BIND 9 build perl Configure clean -Step 10: Building BIND 9 +Step 9: Building BIND 9 Building using 'nmake' or older versions of Visual Studio (e.g. VS 2005 or VS 2008) is no longer supported. @@ -241,7 +220,7 @@ Step 10: Building BIND 9 After this step this documentation applies to external or remote builds, i.e., is common with installation. -Step 11: Install +Step 10: Install Installation is accomplished by running the BINDInstall program. All DLL's are copied to the Program Files area and all applications @@ -264,18 +243,5 @@ Step 11: Install The idea is to be able to use any BINDInstall.exe binary so a non-free version of Visual Studio is no longer required. -Step 12: Python package install - - When BIND 9 was built with python support, the isc python package - must be installed locally by: - - cd - cd bin/python - python setup.py install - - (replace 'python' by the path of your python interpreter if needed.) - - BIND 9 python tools should work with version 2 or 3, 32 or 64 bits. - Please report bugs, whether in the process of building the application or in BIND 9 itself, at https://gitlab.isc.org/isc-projects/bind9.