1.. Copyright (C) Internet Systems Consortium, Inc. ("ISC") 2.. 3.. SPDX-License-Identifier: MPL-2.0 4.. 5.. This Source Code Form is subject to the terms of the Mozilla Public 6.. License, v. 2.0. If a copy of the MPL was not distributed with this 7.. file, you can obtain one at https://mozilla.org/MPL/2.0/. 8.. 9.. See the COPYRIGHT file distributed with this work for additional 10.. information regarding copyright ownership. 11 12.. highlight: console 13 14.. _man_dnssec-settime: 15 16dnssec-settime: set the key timing metadata for a DNSSEC key 17------------------------------------------------------------ 18 19Synopsis 20~~~~~~~~ 21 22:program:`dnssec-settime` [**-f**] [**-K** directory] [**-L** ttl] [**-P** date/offset] [**-P** ds date/offset] [**-P** sync date/offset] [**-A** date/offset] [**-R** date/offset] [**-I** date/offset] [**-D** date/offset] [**-D** ds date/offset] [**-D** sync date/offset] [**-S** key] [**-i** interval] [**-h**] [**-V**] [**-v** level] [**-E** engine] {keyfile} [**-s**] [**-g** state] [**-d** state date/offset] [**-k** state date/offset] [**-r** state date/offset] [**-z** state date/offset] 23 24Description 25~~~~~~~~~~~ 26 27``dnssec-settime`` reads a DNSSEC private key file and sets the key 28timing metadata as specified by the ``-P``, ``-A``, ``-R``, ``-I``, and 29``-D`` options. The metadata can then be used by ``dnssec-signzone`` or 30other signing software to determine when a key is to be published, 31whether it should be used for signing a zone, etc. 32 33If none of these options is set on the command line, 34``dnssec-settime`` simply prints the key timing metadata already stored 35in the key. 36 37When key metadata fields are changed, both files of a key pair 38(``Knnnn.+aaa+iiiii.key`` and ``Knnnn.+aaa+iiiii.private``) are 39regenerated. 40 41Metadata fields are stored in the private file. A 42human-readable description of the metadata is also placed in comments in 43the key file. The private file's permissions are always set to be 44inaccessible to anyone other than the owner (mode 0600). 45 46When working with state files, it is possible to update the timing metadata in 47those files as well with ``-s``. With this option, it is also possible to update key 48states with ``-d`` (DS), ``-k`` (DNSKEY), ``-r`` (RRSIG of KSK), or ``-z`` 49(RRSIG of ZSK). Allowed states are HIDDEN, RUMOURED, OMNIPRESENT, and 50UNRETENTIVE. 51 52The goal state of the key can also be set with ``-g``. This should be either 53HIDDEN or OMNIPRESENT, representing whether the key should be removed from the 54zone or published. 55 56It is NOT RECOMMENDED to manipulate state files manually, except for testing 57purposes. 58 59Options 60~~~~~~~ 61 62``-f`` 63 This option forces an update of an old-format key with no metadata fields. Without 64 this option, ``dnssec-settime`` fails when attempting to update a 65 legacy key. With this option, the key is recreated in the new 66 format, but with the original key data retained. The key's creation 67 date is set to the present time. If no other values are 68 specified, then the key's publication and activation dates are also 69 set to the present time. 70 71``-K directory`` 72 This option sets the directory in which the key files are to reside. 73 74``-L ttl`` 75 This option sets the default TTL to use for this key when it is converted into a 76 DNSKEY RR. This is the TTL used when the key is imported into a zone, 77 unless there was already a DNSKEY RRset in 78 place, in which case the existing TTL takes precedence. If this 79 value is not set and there is no existing DNSKEY RRset, the TTL 80 defaults to the SOA TTL. Setting the default TTL to ``0`` or ``none`` 81 removes it from the key. 82 83``-h`` 84 This option emits a usage message and exits. 85 86``-V`` 87 This option prints version information. 88 89``-v level`` 90 This option sets the debugging level. 91 92``-E engine`` 93 This option specifies the cryptographic hardware to use, when applicable. 94 95 When BIND 9 is built with OpenSSL, this needs to be set to the OpenSSL 96 engine identifier that drives the cryptographic accelerator or 97 hardware service module (usually ``pkcs11``). When BIND is 98 built with native PKCS#11 cryptography (``--enable-native-pkcs11``), it 99 defaults to the path of the PKCS#11 provider library specified via 100 ``--with-pkcs11``. 101 102Timing Options 103~~~~~~~~~~~~~~ 104 105Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the 106argument begins with a ``+`` or ``-``, it is interpreted as an offset from 107the present time. For convenience, if such an offset is followed by one 108of the suffixes ``y``, ``mo``, ``w``, ``d``, ``h``, or ``mi``, then the offset is 109computed in years (defined as 365 24-hour days, ignoring leap years), 110months (defined as 30 24-hour days), weeks, days, hours, or minutes, 111respectively. Without a suffix, the offset is computed in seconds. To 112explicitly prevent a date from being set, use ``none`` or ``never``. 113 114``-P date/offset`` 115 This option sets the date on which a key is to be published to the zone. After 116 that date, the key is included in the zone but is not used 117 to sign it. 118 119``-P ds date/offset`` 120 This option Sets the date on which DS records that match this key have been 121 seen in the parent zone. 122 123``-P sync date/offset`` 124 This option sets the date on which CDS and CDNSKEY records that match this key 125 are to be published to the zone. 126 127``-A date/offset`` 128 This option sets the date on which the key is to be activated. After that date, 129 the key is included in the zone and used to sign it. 130 131``-R date/offset`` 132 This option sets the date on which the key is to be revoked. After that date, the 133 key is flagged as revoked. It is included in the zone and 134 is used to sign it. 135 136``-I date/offset`` 137 This option sets the date on which the key is to be retired. After that date, the 138 key is still included in the zone, but it is not used to 139 sign it. 140 141``-D date/offset`` 142 This option sets the date on which the key is to be deleted. After that date, the 143 key is no longer included in the zone. (However, it may remain in the key 144 repository.) 145 146``-D ds date/offset`` 147 This option sets the date on which the DS records that match this key have 148 been seen removed from the parent zone. 149 150``-D sync date/offset`` 151 This option sets the date on which the CDS and CDNSKEY records that match this 152 key are to be deleted. 153 154``-S predecessor key`` 155 This option selects a key for which the key being modified is an explicit 156 successor. The name, algorithm, size, and type of the predecessor key 157 must exactly match those of the key being modified. The activation 158 date of the successor key is set to the inactivation date of the 159 predecessor. The publication date is set to the activation date 160 minus the prepublication interval, which defaults to 30 days. 161 162``-i interval`` 163 This option sets the prepublication interval for a key. If set, then the 164 publication and activation dates must be separated by at least this 165 much time. If the activation date is specified but the publication 166 date is not, the publication date defaults to this much time 167 before the activation date; conversely, if the publication date is 168 specified but not the activation date, activation is set to 169 this much time after publication. 170 171 If the key is being created as an explicit successor to another key, 172 then the default prepublication interval is 30 days; otherwise it is 173 zero. 174 175 As with date offsets, if the argument is followed by one of the 176 suffixes ``y``, ``mo``, ``w``, ``d``, ``h``, or ``mi``, the interval is 177 measured in years, months, weeks, days, hours, or minutes, 178 respectively. Without a suffix, the interval is measured in seconds. 179 180Key State Options 181~~~~~~~~~~~~~~~~~ 182 183To test dnssec-policy it may be necessary to construct keys with artificial 184state information; these options are used by the testing framework for that 185purpose, but should never be used in production. 186 187Known key states are HIDDEN, RUMOURED, OMNIPRESENT, and UNRETENTIVE. 188 189``-s`` 190 This option indicates that when setting key timing data, the state file should also be updated. 191 192``-g state`` 193 This option sets the goal state for this key. Must be HIDDEN or OMNIPRESENT. 194 195``-d state date/offset`` 196 This option sets the DS state for this key as of the specified date, offset from the current date. 197 198``-k state date/offset`` 199 This option sets the DNSKEY state for this key as of the specified date, offset from the current date. 200 201``-r state date/offset`` 202 This option sets the RRSIG (KSK) state for this key as of the specified date, offset from the current date. 203 204``-z state date/offset`` 205 This option sets the RRSIG (ZSK) state for this key as of the specified date, offset from the current date. 206 207Printing Options 208~~~~~~~~~~~~~~~~ 209 210``dnssec-settime`` can also be used to print the timing metadata 211associated with a key. 212 213``-u`` 214 This option indicates that times should be printed in Unix epoch format. 215 216``-p C/P/Pds/Psync/A/R/I/D/Dds/Dsync/all`` 217 This option prints a specific metadata value or set of metadata values. 218 The ``-p`` option may be followed by one or more of the following letters or 219 strings to indicate which value or values to print: ``C`` for the 220 creation date, ``P`` for the publication date, ``Pds` for the DS publication 221 date, ``Psync`` for the CDS and CDNSKEY publication date, ``A`` for the 222 activation date, ``R`` for the revocation date, ``I`` for the inactivation 223 date, ``D`` for the deletion date, ``Dds`` for the DS deletion date, 224 and ``Dsync`` for the CDS and CDNSKEY deletion date. To print all of the 225 metadata, use ``all``. 226 227See Also 228~~~~~~~~ 229 230:manpage:`dnssec-keygen(8)`, :manpage:`dnssec-signzone(8)`, BIND 9 Administrator Reference Manual, 231:rfc:`5011`. 232