dnssec-signzone.docbook 32.2 KB
Newer Older
Brian Wellington's avatar
Brian Wellington committed
1
<!--
2
 - Copyright (C) 2000-2009, 2011-2016  Internet Systems Consortium, Inc. ("ISC")
Brian Wellington's avatar
Brian Wellington committed
3
 -
4 5 6
 - 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/.
Brian Wellington's avatar
Brian Wellington committed
7
-->
Tinderbox User's avatar
Tinderbox User committed
8

Evan Hunt's avatar
Evan Hunt committed
9 10 11 12 13
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-signzone">
  <info>
    <date>2014-02-18</date>
  </info>
14
  <refentryinfo>
Evan Hunt's avatar
Evan Hunt committed
15 16
    <corpname>ISC</corpname>
    <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
17 18 19 20
  </refentryinfo>

  <refmeta>
    <refentrytitle><application>dnssec-signzone</application></refentrytitle>
21
   <manvolnum>8</manvolnum>
22 23 24 25 26 27 28 29
    <refmiscinfo>BIND9</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname><application>dnssec-signzone</application></refname>
    <refpurpose>DNSSEC zone signing tool</refpurpose>
  </refnamediv>

30 31 32 33
  <docinfo>
    <copyright>
      <year>2004</year>
      <year>2005</year>
Mark Andrews's avatar
Mark Andrews committed
34
      <year>2006</year>
Mark Andrews's avatar
Mark Andrews committed
35
      <year>2007</year>
Automatic Updater's avatar
Automatic Updater committed
36
      <year>2008</year>
Automatic Updater's avatar
Automatic Updater committed
37
      <year>2009</year>
Automatic Updater's avatar
Automatic Updater committed
38
      <year>2011</year>
Tinderbox User's avatar
Tinderbox User committed
39
      <year>2012</year>
Tinderbox User's avatar
Tinderbox User committed
40
      <year>2013</year>
Tinderbox User's avatar
Tinderbox User committed
41
      <year>2014</year>
42
      <year>2015</year>
43
      <year>2016</year>
44 45
      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
    </copyright>
Tinderbox User's avatar
Tinderbox User committed
46 47 48 49 50 51 52
    <copyright>
      <year>2000</year>
      <year>2001</year>
      <year>2002</year>
      <year>2003</year>
      <holder>Internet Software Consortium.</holder>
    </copyright>
53 54
  </docinfo>

55
  <refsynopsisdiv>
Evan Hunt's avatar
Evan Hunt committed
56
    <cmdsynopsis sepchar=" ">
57
      <command>dnssec-signzone</command>
Evan Hunt's avatar
Evan Hunt committed
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
      <arg choice="opt" rep="norepeat"><option>-a</option></arg>
      <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-d <replaceable class="parameter">directory</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-D</option></arg>
      <arg choice="opt" rep="norepeat"><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-e <replaceable class="parameter">end-time</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">output-file</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-g</option></arg>
      <arg choice="opt" rep="norepeat"><option>-h</option></arg>
      <arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">key</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-M <replaceable class="parameter">domain</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">interval</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-I <replaceable class="parameter">input-format</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-j <replaceable class="parameter">jitter</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-N <replaceable class="parameter">soa-serial-format</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-P</option></arg>
      <arg choice="opt" rep="norepeat"><option>-p</option></arg>
      <arg choice="opt" rep="norepeat"><option>-Q</option></arg>
      <arg choice="opt" rep="norepeat"><option>-R</option></arg>
      <arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-S</option></arg>
      <arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">ttl</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-t</option></arg>
      <arg choice="opt" rep="norepeat"><option>-u</option></arg>
      <arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-V</option></arg>
      <arg choice="opt" rep="norepeat"><option>-X <replaceable class="parameter">extended end-time</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-x</option></arg>
      <arg choice="opt" rep="norepeat"><option>-z</option></arg>
      <arg choice="opt" rep="norepeat"><option>-3 <replaceable class="parameter">salt</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-H <replaceable class="parameter">iterations</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-A</option></arg>
      <arg choice="req" rep="norepeat">zonefile</arg>
      <arg rep="repeat" choice="opt">key</arg>
98 99 100
    </cmdsynopsis>
  </refsynopsisdiv>

Evan Hunt's avatar
Evan Hunt committed
101
  <refsection><info><title>DESCRIPTION</title></info>
102

103 104 105 106 107 108 109
    <para><command>dnssec-signzone</command>
      signs a zone.  It generates
      NSEC and RRSIG records and produces a signed version of the
      zone. The security status of delegations from the signed zone
      (that is, whether the child zones are secure or not) is
      determined by the presence or absence of a
      <filename>keyset</filename> file for each child zone.
110
    </para>
Evan Hunt's avatar
Evan Hunt committed
111
  </refsection>
112

Evan Hunt's avatar
Evan Hunt committed
113
  <refsection><info><title>OPTIONS</title></info>
114

115 116 117 118

    <variablelist>
      <varlistentry>
        <term>-a</term>
119 120 121 122 123
        <listitem>
          <para>
            Verify all generated signatures.
          </para>
        </listitem>
124 125 126 127
      </varlistentry>

      <varlistentry>
        <term>-c <replaceable class="parameter">class</replaceable></term>
128 129 130 131 132
        <listitem>
          <para>
            Specifies the DNS class of the zone.
          </para>
        </listitem>
133 134
      </varlistentry>

135 136 137 138 139 140 141 142 143 144 145 146 147 148
      <varlistentry>
        <term>-C</term>
        <listitem>
          <para>
            Compatibility mode: Generate a
            <filename>keyset-<replaceable>zonename</replaceable></filename>
            file in addition to
            <filename>dsset-<replaceable>zonename</replaceable></filename>
            when signing a zone, for use by older versions of
            <command>dnssec-signzone</command>.
          </para>
        </listitem>
      </varlistentry>

149
      <varlistentry>
150
        <term>-d <replaceable class="parameter">directory</replaceable></term>
151 152
        <listitem>
          <para>
153 154
            Look for <filename>dsset-</filename> or
            <filename>keyset-</filename> files in <option>directory</option>.
155 156
          </para>
        </listitem>
157 158
      </varlistentry>

159 160 161 162 163 164 165 166 167 168
      <varlistentry>
        <term>-D</term>
        <listitem>
          <para>
	    Output only those record types automatically managed by
	    <command>dnssec-signzone</command>, i.e. RRSIG, NSEC,
	    NSEC3 and NSEC3PARAM records. If smart signing
	    (<option>-S</option>) is used, DNSKEY records are also
	    included. The resulting file can be included in the original
	    zone file with <command>$INCLUDE</command>. This option
169
	    cannot be combined with <option>-O raw</option>,
Evan Hunt's avatar
Evan Hunt committed
170
            <option>-O map</option>, or serial number updating.
171 172 173 174
          </para>
        </listitem>
      </varlistentry>

Francis Dupont's avatar
Francis Dupont committed
175 176 177 178
      <varlistentry>
        <term>-E <replaceable class="parameter">engine</replaceable></term>
        <listitem>
          <para>
Evan Hunt's avatar
Evan Hunt committed
179 180 181 182 183 184 185 186 187 188 189
            When applicable, specifies the hardware to use for
            cryptographic operations, such as a secure key store used
            for signing.
          </para>
          <para>
            When BIND is built with OpenSSL PKCS#11 support, this defaults
            to the string "pkcs11", which identifies an OpenSSL engine
            that can drive a cryptographic accelerator or hardware service
            module.  When BIND is built with native PKCS#11 cryptography
            (--enable-native-pkcs11), it defaults to the path of the PKCS#11
            provider library specified via "--with-pkcs11".
Francis Dupont's avatar
Francis Dupont committed
190 191 192 193
          </para>
        </listitem>
      </varlistentry>

194
      <varlistentry>
195
        <term>-g</term>
196 197
        <listitem>
          <para>
198 199 200
            Generate DS records for child zones from
            <filename>dsset-</filename> or <filename>keyset-</filename>
            file.  Existing DS records will be removed.
201 202
          </para>
        </listitem>
203 204
      </varlistentry>

205
      <varlistentry>
206
        <term>-K <replaceable class="parameter">directory</replaceable></term>
207 208
        <listitem>
          <para>
209 210
            Key repository: Specify a directory to search for DNSSEC keys.
            If not specified, defaults to the current directory.
211 212
          </para>
        </listitem>
213 214
      </varlistentry>

215
      <varlistentry>
216
        <term>-k <replaceable class="parameter">key</replaceable></term>
217 218
        <listitem>
          <para>
219 220 221 222 223 224 225 226 227 228 229 230
            Treat specified key as a key signing key ignoring any
            key flags.  This option may be specified multiple times.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-l <replaceable class="parameter">domain</replaceable></term>
        <listitem>
          <para>
            Generate a DLV set in addition to the key (DNSKEY) and DS sets.
            The domain is appended to the name of the records.
231 232
          </para>
        </listitem>
233 234
      </varlistentry>

Evan Hunt's avatar
Evan Hunt committed
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
      <varlistentry>
        <term>-M <replaceable class="parameter">maxttl</replaceable></term>
        <listitem>
          <para>
            Sets the maximum TTL for the signed zone.
            Any TTL higher than <replaceable>maxttl</replaceable> in the
            input zone will be reduced to <replaceable>maxttl</replaceable>
            in the output. This provides certainty as to the largest
            possible TTL in the signed zone, which is useful to know when
            rolling keys because it is the longest possible time before
            signatures that have been retrieved by resolvers will expire
            from resolver caches.  Zones that are signed with this
            option should be configured to use a matching
            <option>max-zone-ttl</option> in <filename>named.conf</filename>.
            (Note: This option is incompatible with <option>-D</option>,
            because it modifies non-DNSSEC data in the output zone.)
          </para>
        </listitem>
      </varlistentry>

255 256
      <varlistentry>
        <term>-s <replaceable class="parameter">start-time</replaceable></term>
257 258 259 260 261 262 263 264 265 266 267 268
        <listitem>
          <para>
            Specify the date and time when the generated RRSIG records
            become valid.  This can be either an absolute or relative
            time.  An absolute start time is indicated by a number
            in YYYYMMDDHHMMSS notation; 20000530144500 denotes
            14:45:00 UTC on May 30th, 2000.  A relative start time is
            indicated by +N, which is N seconds from the current time.
            If no <option>start-time</option> is specified, the current
            time minus 1 hour (to allow for clock skew) is used.
          </para>
        </listitem>
269 270 271 272
      </varlistentry>

      <varlistentry>
        <term>-e <replaceable class="parameter">end-time</replaceable></term>
273 274 275 276 277 278 279 280 281
        <listitem>
          <para>
            Specify the date and time when the generated RRSIG records
            expire.  As with <option>start-time</option>, an absolute
            time is indicated in YYYYMMDDHHMMSS notation.  A time relative
            to the start time is indicated with +N, which is N seconds from
            the start time.  A time relative to the current time is
            indicated with now+N.  If no <option>end-time</option> is
            specified, 30 days from the start time is used as a default.
282 283
            <option>end-time</option> must be later than
            <option>start-time</option>.
284 285
          </para>
        </listitem>
286 287
      </varlistentry>

288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
      <varlistentry>
        <term>-X <replaceable class="parameter">extended end-time</replaceable></term>
        <listitem>
          <para>
            Specify the date and time when the generated RRSIG records
            for the DNSKEY RRset will expire.  This is to be used in cases
            when the DNSKEY signatures need to persist longer than
            signatures on other records; e.g., when the private component
            of the KSK is kept offline and the KSK signature is to be
            refreshed manually.
          </para>
          <para>
            As with <option>start-time</option>, an absolute
            time is indicated in YYYYMMDDHHMMSS notation.  A time relative
            to the start time is indicated with +N, which is N seconds from
            the start time.  A time relative to the current time is
            indicated with now+N.  If no <option>extended end-time</option> is
            specified, the value of <option>end-time</option> is used as
            the default.  (<option>end-time</option>, in turn, defaults to
            30 days from the start time.) <option>extended end-time</option>
            must be later than <option>start-time</option>.
          </para>
        </listitem>
      </varlistentry>

313 314
      <varlistentry>
        <term>-f <replaceable class="parameter">output-file</replaceable></term>
315 316 317 318
        <listitem>
          <para>
            The name of the output file containing the signed zone.  The
            default is to append <filename>.signed</filename> to
319 320 321 322
            the input filename.  If <option>output-file</option> is
            set to <literal>"-"</literal>, then the signed zone is
            written to the standard output, with a default output
            format of "full".
323 324
          </para>
        </listitem>
325 326 327 328
      </varlistentry>

      <varlistentry>
        <term>-h</term>
329 330 331 332 333 334
        <listitem>
          <para>
            Prints a short summary of the options and arguments to
            <command>dnssec-signzone</command>.
          </para>
        </listitem>
335 336
      </varlistentry>

337 338 339 340 341 342 343 344 345
      <varlistentry>
	<term>-V</term>
        <listitem>
	  <para>
	    Prints version information.
	  </para>
        </listitem>
      </varlistentry>

346 347
      <varlistentry>
        <term>-i <replaceable class="parameter">interval</replaceable></term>
348 349
        <listitem>
          <para>
350
            When a previously-signed zone is passed as input, records
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
            may be resigned.  The <option>interval</option> option
            specifies the cycle interval as an offset from the current
            time (in seconds).  If a RRSIG record expires after the
            cycle interval, it is retained.  Otherwise, it is considered
            to be expiring soon, and it will be replaced.
          </para>
          <para>
            The default cycle interval is one quarter of the difference
            between the signature end and start times.  So if neither
            <option>end-time</option> or <option>start-time</option>
            are specified, <command>dnssec-signzone</command>
            generates
            signatures that are valid for 30 days, with a cycle
            interval of 7.5 days.  Therefore, if any existing RRSIG records
            are due to expire in less than 7.5 days, they would be
            replaced.
          </para>
        </listitem>
369 370
      </varlistentry>

371 372 373 374 375
      <varlistentry>
        <term>-I <replaceable class="parameter">input-format</replaceable></term>
        <listitem>
          <para>
            The format of the input zone file.
376
	    Possible formats are <command>"text"</command> (default),
Evan Hunt's avatar
Evan Hunt committed
377
	    <command>"raw"</command>, and <command>"map"</command>.
378 379 380 381 382 383 384 385 386
	    This option is primarily intended to be used for dynamic
            signed zones so that the dumped zone file in a non-text
            format containing updates can be signed directly.
	    The use of this option does not make much sense for
	    non-dynamic zones.
          </para>
        </listitem>
      </varlistentry>

387
      <varlistentry>
388 389 390 391 392 393
        <term>-j <replaceable class="parameter">jitter</replaceable></term>
        <listitem>
          <para>
            When signing a zone with a fixed signature lifetime, all
            RRSIG records issued at the time of signing expires
            simultaneously.  If the zone is incrementally signed, i.e.
394 395
            a previously-signed zone is passed as input to the signer,
            all expired signatures have to be regenerated at about the
396 397 398 399 400 401 402 403 404 405 406 407 408
            same time.  The <option>jitter</option> option specifies a
            jitter window that will be used to randomize the signature
            expire time, thus spreading incremental signature
            regeneration over time.
          </para>
          <para>
            Signature lifetime jitter also to some extent benefits
            validators and servers by spreading out cache expiration,
            i.e. if large numbers of RRSIGs don't expire at the same time
            from all caches there will be less congestion than if all
            validators need to refetch at mostly the same time.
          </para>
        </listitem>
409 410
      </varlistentry>

411 412 413 414
      <varlistentry>
        <term>-L <replaceable class="parameter">serial</replaceable></term>
        <listitem>
          <para>
Evan Hunt's avatar
Evan Hunt committed
415
            When writing a signed zone to "raw" or "map" format, set the
416 417 418
            "source serial" value in the header to the specified serial
            number.  (This is expected to be used primarily for testing
            purposes.)
419 420 421 422
          </para>
        </listitem>
      </varlistentry>

423 424
      <varlistentry>
        <term>-n <replaceable class="parameter">ncpus</replaceable></term>
425 426 427 428 429 430
        <listitem>
          <para>
            Specifies the number of threads to use.  By default, one
            thread is started for each detected CPU.
          </para>
        </listitem>
431 432
      </varlistentry>

433 434 435 436 437 438
      <varlistentry>
        <term>-N <replaceable class="parameter">soa-serial-format</replaceable></term>
        <listitem>
          <para>
            The SOA serial number format of the signed zone.
	    Possible formats are <command>"keep"</command> (default),
Evan Hunt's avatar
Evan Hunt committed
439 440
            <command>"increment"</command>, <command>"unixtime"</command>,
            and <command>"date"</command>.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465
          </para>

          <variablelist>
	    <varlistentry>
	      <term><command>"keep"</command></term>
              <listitem>
                <para>Do not modify the SOA serial number.</para>
	      </listitem>
            </varlistentry>

	    <varlistentry>
	      <term><command>"increment"</command></term>
              <listitem>
                <para>Increment the SOA serial number using RFC 1982
                      arithmetics.</para>
	      </listitem>
            </varlistentry>

	    <varlistentry>
	      <term><command>"unixtime"</command></term>
              <listitem>
                <para>Set the SOA serial number to the number of seconds
	        since epoch.</para>
	      </listitem>
            </varlistentry>
Evan Hunt's avatar
Evan Hunt committed
466 467 468 469 470 471 472 473

	    <varlistentry>
	      <term><command>"date"</command></term>
              <listitem>
                <para>Set the SOA serial number to today's date in
                YYYYMMDDNN format.</para>
	      </listitem>
            </varlistentry>
474 475 476 477 478
	 </variablelist>

        </listitem>
      </varlistentry>

479 480
      <varlistentry>
        <term>-o <replaceable class="parameter">origin</replaceable></term>
481 482 483 484 485 486
        <listitem>
          <para>
            The zone origin.  If not specified, the name of the zone file
            is assumed to be the origin.
          </para>
        </listitem>
487 488
      </varlistentry>

489 490 491 492 493
      <varlistentry>
        <term>-O <replaceable class="parameter">output-format</replaceable></term>
        <listitem>
          <para>
            The format of the output file containing the signed zone.
494 495
	    Possible formats are <command>"text"</command> (default),
            which is the standard textual representation of the zone;
496
	    <command>"full"</command>, which is text output in a
497
            format suitable for processing by external scripts;
Evan Hunt's avatar
Evan Hunt committed
498
            and <command>"map"</command>, <command>"raw"</command>,
499 500 501 502 503 504
            and <command>"raw=N"</command>, which store the zone in
            binary formats for rapid loading by <command>named</command>.
            <command>"raw=N"</command> specifies the format version of
            the raw zone file: if N is 0, the raw file can be read by
            any version of <command>named</command>; if N is 1, the file
            can be read by release 9.9.0 or higher; the default is 1.
505 506 507 508
          </para>
        </listitem>
      </varlistentry>

509 510
      <varlistentry>
        <term>-p</term>
511 512 513 514 515 516 517 518
        <listitem>
          <para>
            Use pseudo-random data when signing the zone.  This is faster,
            but less secure, than using real random data.  This option
            may be useful when signing large zones or when the entropy
            source is limited.
          </para>
        </listitem>
519 520
      </varlistentry>

521 522 523 524 525 526 527 528
      <varlistentry>
        <term>-P</term>
        <listitem>
          <para>
	    Disable post sign verification tests.
          </para>
          <para>
	    The post sign verification test ensures that for each algorithm
529 530
	    in use there is at least one non revoked self signed KSK key,
	    that all revoked KSK keys are self signed, and that all records
531
	    in the zone are signed by the algorithm.
532
	    This option skips these tests.
533 534 535 536
          </para>
        </listitem>
      </varlistentry>

537
      <varlistentry>
Evan Hunt's avatar
Evan Hunt committed
538
        <term>-Q</term>
539 540
        <listitem>
          <para>
Evan Hunt's avatar
Evan Hunt committed
541
	    Remove signatures from keys that are no longer active.
542 543 544 545
          </para>
          <para>
            Normally, when a previously-signed zone is passed as input
            to the signer, and a DNSKEY record has been removed and
546
            replaced with a new one, signatures from the old key
547 548
            that are still within their validity period are retained.
	    This allows the zone to continue to validate with cached
Evan Hunt's avatar
Evan Hunt committed
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
	    copies of the old DNSKEY RRset.  The <option>-Q</option>
            forces <command>dnssec-signzone</command> to remove
            signatures from keys that are no longer active. This
            enables ZSK rollover using the procedure described in
            RFC 4641, section 4.2.1.1 ("Pre-Publish Key Rollover").
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>-R</term>
        <listitem>
          <para>
	    Remove signatures from keys that are no longer published.
          </para>
          <para>
            This option is similar to <option>-Q</option>, except it
            forces <command>dnssec-signzone</command> to signatures from
            keys that are no longer published. This enables ZSK rollover
            using the procedure described in RFC 4641, section 4.2.1.2
            ("Double Signature Zone Signing Key Rollover").
569 570 571
          </para>
        </listitem>
      </varlistentry>
572 573
      <varlistentry>
        <term>-r <replaceable class="parameter">randomdev</replaceable></term>
574 575 576 577 578 579 580 581 582 583 584 585 586
        <listitem>
          <para>
            Specifies the source of randomness.  If the operating
            system does not provide a <filename>/dev/random</filename>
            or equivalent device, the default source of randomness
            is keyboard input.  <filename>randomdev</filename>
            specifies
            the name of a character device or file containing random
            data to be used instead of the default.  The special value
            <filename>keyboard</filename> indicates that keyboard
            input should be used.
          </para>
        </listitem>
587 588
      </varlistentry>

589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
      <varlistentry>
        <term>-S</term>
        <listitem>
          <para>
            Smart signing: Instructs <command>dnssec-signzone</command> to
            search the key repository for keys that match the zone being
            signed, and to include them in the zone if appropriate.
          </para>
          <para>
            When a key is found, its timing metadata is examined to
            determine how it should be used, according to the following
            rules.  Each successive rule takes priority over the prior
            ones:
          </para>
          <variablelist>
	    <varlistentry>
              <listitem>
                <para>
                  If no timing metadata has been set for the key, the key is
                  published in the zone and used to sign the zone.
                </para>
	      </listitem>
            </varlistentry>

	    <varlistentry>
              <listitem>
                <para>
                  If the key's publication date is set and is in the past, the
                  key is published in the zone.
                </para>
	      </listitem>
            </varlistentry>

	    <varlistentry>
              <listitem>
                <para>
                  If the key's activation date is set and in the past, the
                  key is published (regardless of publication date) and
627
                  used to sign the zone.
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658
                </para>
	      </listitem>
            </varlistentry>

	    <varlistentry>
              <listitem>
                <para>
                  If the key's revocation date is set and in the past, and the
                  key is published, then the key is revoked, and the revoked key
                  is used to sign the zone.
                </para>
	      </listitem>
            </varlistentry>

	    <varlistentry>
              <listitem>
                <para>
                  If either of the key's unpublication or deletion dates are set
                  and in the past, the key is NOT published or used to sign the
                  zone, regardless of any other metadata.
                </para>
	      </listitem>
            </varlistentry>
	 </variablelist>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-T <replaceable class="parameter">ttl</replaceable></term>
        <listitem>
          <para>
659 660 661
            Specifies a TTL to be used for new DNSKEY records imported
            into the zone from the key repository.  If not
            specified, the default is the TTL value from the zone's SOA
662 663 664 665 666
            record.  This option is ignored when signing without
            <option>-S</option>, since DNSKEY records are not imported
            from the key repository in that case.  It is also ignored if
            there are any pre-existing DNSKEY records at the zone apex,
            in which case new records' TTL values will be set to match
667 668 669
            them, or if any of the imported DNSKEY records had a default
            TTL value.  In the event of a a conflict between TTL values in
            imported keys, the shortest one is used.
670 671 672 673
          </para>
        </listitem>
      </varlistentry>

674 675
      <varlistentry>
        <term>-t</term>
676 677 678 679 680
        <listitem>
          <para>
            Print statistics at completion.
          </para>
        </listitem>
681 682
      </varlistentry>

683 684 685 686 687 688 689 690 691 692 693 694 695 696
      <varlistentry>
        <term>-u</term>
        <listitem>
          <para>
            Update NSEC/NSEC3 chain when re-signing a previously signed
            zone.  With this option, a zone signed with NSEC can be
            switched to NSEC3, or a zone signed with NSEC3 can
            be switch to NSEC or to NSEC3 with different parameters.
            Without this option, <command>dnssec-signzone</command> will
            retain the existing chain when re-signing.
          </para>
        </listitem>
      </varlistentry>

697 698
      <varlistentry>
        <term>-v <replaceable class="parameter">level</replaceable></term>
699 700 701 702 703
        <listitem>
          <para>
            Sets the debugging level.
          </para>
        </listitem>
704 705
      </varlistentry>

706 707 708 709 710
      <varlistentry>
        <term>-x</term>
        <listitem>
          <para>
            Only sign the DNSKEY RRset with key-signing keys, and omit
Evan Hunt's avatar
Evan Hunt committed
711
            signatures from zone-signing keys.  (This is similar to the
712
            <command>dnssec-dnskey-kskonly yes;</command> zone option in
Evan Hunt's avatar
Evan Hunt committed
713
            <command>named</command>.)
714 715 716 717
          </para>
        </listitem>
      </varlistentry>

718 719
      <varlistentry>
        <term>-z</term>
720 721
        <listitem>
          <para>
722 723
            Ignore KSK flag on key when determining what to sign.  This
            causes KSK-flagged keys to sign all records, not just the
Evan Hunt's avatar
Evan Hunt committed
724 725 726
            DNSKEY RRset.  (This is similar to the
            <command>update-check-ksk no;</command> zone option in
            <command>named</command>.)
727 728
          </para>
        </listitem>
729 730
      </varlistentry>

731 732 733 734
      <varlistentry>
        <term>-3 <replaceable class="parameter">salt</replaceable></term>
        <listitem>
          <para>
735
            Generate an NSEC3 chain with the given hex encoded salt.
736 737 738 739 740 741 742 743 744 745
	    A dash (<replaceable class="parameter">salt</replaceable>) can
	    be used to indicate that no salt is to be used when generating		    the NSEC3 chain.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-H <replaceable class="parameter">iterations</replaceable></term>
        <listitem>
          <para>
Mark Andrews's avatar
typos  
Mark Andrews committed
746
	    When generating an NSEC3 chain, use this many iterations.  The
747
	    default is 10.
748 749 750 751 752 753 754 755
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-A</term>
        <listitem>
          <para>
756
	    When generating an NSEC3 chain set the OPTOUT flag on all
757 758 759
	    NSEC3 records and do not generate NSEC3 records for insecure
	    delegations.
          </para>
760 761 762 763 764 765
          <para>
	    Using this option twice (i.e., <option>-AA</option>)
	    turns the OPTOUT flag off for all records.  This is useful
	    when using the <option>-u</option> option to modify an NSEC3
	    chain which previously had OPTOUT set.
          </para>
766 767 768
        </listitem>
      </varlistentry>

769 770
      <varlistentry>
        <term>zonefile</term>
771 772 773 774 775
        <listitem>
          <para>
            The file containing the zone to be signed.
          </para>
        </listitem>
776 777 778 779
      </varlistentry>

      <varlistentry>
        <term>key</term>
780 781
        <listitem>
          <para>
782 783 784 785 786
	    Specify which keys should be used to sign the zone.  If
	    no keys are specified, then the zone will be examined
	    for DNSKEY records at the zone apex.  If these are found and
	    there are matching private keys, in the current directory,
	    then these will be used for signing.
787 788
          </para>
        </listitem>
789 790 791
      </varlistentry>

    </variablelist>
Evan Hunt's avatar
Evan Hunt committed
792
  </refsection>
793

Evan Hunt's avatar
Evan Hunt committed
794
  <refsection><info><title>EXAMPLE</title></info>
795

796
    <para>
797
      The following command signs the <userinput>example.com</userinput>
798
      zone with the DSA key generated by <command>dnssec-keygen</command>
799 800 801 802 803
      (Kexample.com.+003+17247).  Because the <command>-S</command> option
      is not being used, the zone's keys must be in the master file
      (<filename>db.example.com</filename>).  This invocation looks
      for <filename>dsset</filename> files, in the current directory,
      so that DS records can be imported from them (<command>-g</command>).
804
    </para>
805 806 807 808
<programlisting>% dnssec-signzone -g -o example.com db.example.com \
Kexample.com.+003+17247
db.example.com.signed
%</programlisting>
809
    <para>
810
      In the above example, <command>dnssec-signzone</command> creates
811
      the file <filename>db.example.com.signed</filename>.  This
812
      file should be referenced in a zone statement in a
813
      <filename>named.conf</filename> file.
814
    </para>
815 816 817 818 819 820 821 822
    <para>
      This example re-signs a previously signed zone with default parameters.
      The private keys are assumed to be in the current directory.
    </para>
<programlisting>% cp db.example.com.signed db.example.com
% dnssec-signzone -o example.com db.example.com
db.example.com.signed
%</programlisting>
Evan Hunt's avatar
Evan Hunt committed
823
  </refsection>
824

Evan Hunt's avatar
Evan Hunt committed
825
  <refsection><info><title>SEE ALSO</title></info>
826

827 828
    <para><citerefentry>
        <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
829 830
      </citerefentry>,
      <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
Evan Hunt's avatar
Evan Hunt committed
831
      <citetitle>RFC 4033</citetitle>, <citetitle>RFC 4641</citetitle>.
832
    </para>
Evan Hunt's avatar
Evan Hunt committed
833
  </refsection>
834

Evan Hunt's avatar
Evan Hunt committed
835
</refentry>