mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
2612. [func] Add default values for the arguments to
dnssec-keygen. Without arguments, it will now generate a 1024-bit RSASHA1 zone-signing key, or with the -f KSK option, a 2048-bit RSASHA1 key-signing key. [RT #19300] 2611. [func] Add -l option to dnssec-dsfromkey to generate DLV records instead of DS records. [RT #19300]
This commit is contained in:
parent
b577875266
commit
b272d38cc5
11
CHANGES
11
CHANGES
@ -1,3 +1,14 @@
|
||||
--- 9.7.0a1 released ---
|
||||
|
||||
2612. [func] Add default values for the arguments to
|
||||
dnssec-keygen. Without arguments, it will now
|
||||
generate a 1024-bit RSASHA1 zone-signing key,
|
||||
or with the -f KSK option, a 2048-bit RSASHA1
|
||||
key-signing key. [RT #19300]
|
||||
|
||||
2611. [func] Add -l option to dnssec-dsfromkey to generate
|
||||
DLV records instead of DS records. [RT #19300]
|
||||
|
||||
2610. [port] sunos: Change #2363 was not complete. [RT #19796]
|
||||
|
||||
2609. [func] Simplify the configuration of dynamic zones:
|
||||
|
32
README
32
README
@ -45,23 +45,27 @@ BIND 9
|
||||
BIND 9.7.0
|
||||
|
||||
BIND 9.7.0 includes a number of changes from BIND 9.6 and earlier
|
||||
releases, including:
|
||||
releases. Most are intended to simplify DNSSEC configuration.
|
||||
New features include:
|
||||
|
||||
Support for RFC 5011, automated trust anchor maintenance.
|
||||
- Simplified configuration of DNSSEC Lookaside Validation (DLV).
|
||||
- Simplified configuration of Dynamic DNS, using the "ddns-confgen"
|
||||
command line tool or the "ddns-autoconf" zone option. (As a side
|
||||
effect, this also makes it easier to configure automatic zone
|
||||
re-signing.)
|
||||
- New named option "attach-cache" that allows multiple views to
|
||||
share a single cache.
|
||||
- New logging category "query-errors" to provide detailed
|
||||
internal information about query failures, especially about
|
||||
server failures.
|
||||
- DNS rebinding attack prevention.
|
||||
- New default values for dnssec-keygen parameters.
|
||||
|
||||
Simplified configuration of DNSSEC Lookaside Validation (DLV).
|
||||
Planned but not complete in alpha:
|
||||
|
||||
Simplified configuration of Dynamic DNS using the "ddns-confgen"
|
||||
command line tool or the "ddns-autoconf" zone option.
|
||||
|
||||
New named option "attach-cache" that allows multiple views to
|
||||
share a single cache.
|
||||
|
||||
New logging category "query-errors" to provide detailed
|
||||
internal information about query failures, especially about
|
||||
server failures.
|
||||
|
||||
DNS rebinding attack prevention.
|
||||
- Support for RFC 5011 (automated trust anchor maintenance)
|
||||
- Simplified tools for zone signing and key maintenance
|
||||
- Fully automatic signing of zones by "named"
|
||||
|
||||
BIND 9.6.0
|
||||
|
||||
|
@ -1,124 +1,96 @@
|
||||
.\" Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and/or distribute this software for any
|
||||
.\" Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and 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,
|
||||
.\" 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.
|
||||
.\"
|
||||
.\" $Id: dnssec-dsfromkey.8,v 1.5 2008/11/08 01:11:47 tbox Exp $
|
||||
.\" $Id: dnssec-dsfromkey.8,v 1.6 2009/06/17 06:51:43 each Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dnssec\-dsfromkey
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: November 29, 2008
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "DNSSEC\-DSFROMKEY" "8" "November 29, 2008" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
dnssec\-dsfromkey \- DNSSEC DS RR generation tool
|
||||
.\"Generated by db2man.xsl. Don't modify this, modify the source.
|
||||
.de Sh \" Subsection
|
||||
.br
|
||||
.if t .Sp
|
||||
.ne 5
|
||||
.PP
|
||||
\fB\\$1\fR
|
||||
.PP
|
||||
..
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Ip \" List item
|
||||
.br
|
||||
.ie \\n(.$>=3 .ne \\$3
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.TH "DNSSEC-DSFROMKEY" 8 "November 29, 2008" "" ""
|
||||
.SH NAME
|
||||
dnssec-dsfromkey \- DNSSEC DS RR generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 17
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] {keyfile}
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-v\ \fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fIalg\fR\fR] {keyfile}
|
||||
.HP 17
|
||||
\fBdnssec\-dsfromkey\fR {\-s} [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdir\fR\fR] {dnsname}
|
||||
\fBdnssec\-dsfromkey\fR {\-s} [\fB\-v\ \fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fIalg\fR\fR] [\fB\-c\ \fIclass\fR\fR] [\fB\-d\ \fIdir\fR\fR] {dnsname}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s).
|
||||
\fBdnssec\-dsfromkey\fR outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s)\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
.TP
|
||||
\-1
|
||||
.RS 4
|
||||
Use SHA\-1 as the digest algorithm (the default is to use both SHA\-1 and SHA\-256).
|
||||
.RE
|
||||
.PP
|
||||
Use SHA\-1 as the digest algorithm (the default is to use both SHA\-1 and SHA\-256)\&.
|
||||
.TP
|
||||
\-2
|
||||
.RS 4
|
||||
Use SHA\-256 as the digest algorithm.
|
||||
.RE
|
||||
.PP
|
||||
Use SHA\-256 as the digest algorithm\&.
|
||||
.TP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Select the digest algorithm. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of SHA\-1 (SHA1) or SHA\-256 (SHA256). These values are case insensitive.
|
||||
.RE
|
||||
.PP
|
||||
Select the digest algorithm\&. The value of \fBalgorithm\fR must be one of SHA\-1 (SHA1) or SHA\-256 (SHA256)\&. These values are case insensitive\&.
|
||||
.TP
|
||||
\-v \fIlevel\fR
|
||||
.RS 4
|
||||
Sets the debugging level.
|
||||
.RE
|
||||
.PP
|
||||
Sets the debugging level\&.
|
||||
.TP
|
||||
\-l \fIdomain\fR
|
||||
Generate a DLV set instead of a DS set\&. The specified \fBdomain\fR is appended to the name for each record in the set\&.
|
||||
.TP
|
||||
\-s
|
||||
.RS 4
|
||||
Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file. Following options make sense only in this mode.
|
||||
.RE
|
||||
.PP
|
||||
Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file\&. Following options make sense only in this mode\&.
|
||||
.TP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Specifies the DNS class (default is IN), useful only in the keyset mode.
|
||||
.RE
|
||||
.PP
|
||||
Specifies the DNS class (default is IN), useful only in the keyset mode\&.
|
||||
.TP
|
||||
\-d \fIdirectory\fR
|
||||
.RS 4
|
||||
Look for
|
||||
\fIkeyset\fR
|
||||
files in
|
||||
\fBdirectory\fR
|
||||
as the directory, ignored when not in the keyset mode.
|
||||
.RE
|
||||
Look for \fIkeyset\fR files in \fBdirectory\fR as the directory, ignored when not in the keyset mode\&.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
To build the SHA\-256 DS RR from the
|
||||
\fBKexample.com.+003+26160\fR
|
||||
keyfile name, the following command would be issued:
|
||||
To build the SHA\-256 DS RR from the \fBKexample\&.com\&.+003+26160\fR keyfile name, the following command would be issued:
|
||||
.PP
|
||||
\fBdnssec\-dsfromkey \-2 Kexample.com.+003+26160\fR
|
||||
\fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR
|
||||
.PP
|
||||
The command would print something like:
|
||||
.PP
|
||||
\fBexample.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94\fR
|
||||
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94\fR
|
||||
.SH "FILES"
|
||||
.PP
|
||||
The keyfile can be designed by the key identification
|
||||
\fIKnnnn.+aaa+iiiii\fR
|
||||
or the full file name
|
||||
\fIKnnnn.+aaa+iiiii.key\fR
|
||||
as generated by
|
||||
dnssec\-keygen(8).
|
||||
The keyfile can be designed by the key identification \fIKnnnn\&.+aaa+iiiii\fR or the full file name \fIKnnnn\&.+aaa+iiiii\&.key\fR as generated by dnssec\-keygen(8)\&.
|
||||
.PP
|
||||
The keyset file name is built from the
|
||||
\fBdirectory\fR, the string
|
||||
\fIkeyset\-\fR
|
||||
and the
|
||||
\fBdnsname\fR.
|
||||
The keyset file name is built from the \fBdirectory\fR, the string \fIkeyset\-\fR and the \fBdnsname\fR\&.
|
||||
.SH "CAVEAT"
|
||||
.PP
|
||||
A keyfile error can give a "file not found" even if the file exists.
|
||||
A keyfile error can give a "file not found" even if the file exists\&.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR(8),
|
||||
\fBdnssec\-signzone\fR(8),
|
||||
BIND 9 Administrator Reference Manual,
|
||||
RFC 3658,
|
||||
RFC 4509.
|
||||
\fBdnssec\-keygen\fR(8), \fBdnssec\-signzone\fR(8), BIND 9 Administrator Reference Manual, RFC 3658, RFC 4509\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Internet Systems Consortium
|
||||
|
@ -14,7 +14,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-dsfromkey.c,v 1.6 2009/05/07 09:33:52 fdupont Exp $ */
|
||||
/* $Id: dnssec-dsfromkey.c,v 1.7 2009/06/17 06:51:43 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -52,19 +52,19 @@ const char *program = "dnssec-dsfromkey";
|
||||
int verbose;
|
||||
|
||||
static dns_rdataclass_t rdclass;
|
||||
static dns_fixedname_t fixed;
|
||||
static dns_name_t *name = NULL;
|
||||
static dns_db_t *db = NULL;
|
||||
static dns_dbnode_t *node = NULL;
|
||||
static dns_rdataset_t keyset;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static dns_fixedname_t fixed;
|
||||
static dns_name_t *name = NULL;
|
||||
static dns_db_t *db = NULL;
|
||||
static dns_dbnode_t *node = NULL;
|
||||
static dns_rdataset_t keyset;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
|
||||
static void
|
||||
loadkeys(char *dirname, char *setname)
|
||||
{
|
||||
isc_result_t result;
|
||||
char filename[1024];
|
||||
isc_buffer_t buf;
|
||||
isc_result_t result;
|
||||
char filename[1024];
|
||||
isc_buffer_t buf;
|
||||
|
||||
dns_rdataset_init(&keyset);
|
||||
dns_fixedname_init(&fixed);
|
||||
@ -78,10 +78,18 @@ loadkeys(char *dirname, char *setname)
|
||||
|
||||
isc_buffer_init(&buf, filename, sizeof(filename));
|
||||
if (dirname != NULL) {
|
||||
if (isc_buffer_availablelength(&buf) < strlen(dirname))
|
||||
fatal("directory name '%s' too long", dirname);
|
||||
isc_buffer_putstr(&buf, dirname);
|
||||
if (dirname[strlen(dirname) - 1] != '/')
|
||||
if (dirname[strlen(dirname) - 1] != '/') {
|
||||
if (isc_buffer_availablelength(&buf) < 1)
|
||||
fatal("directory name '%s' too long", dirname);
|
||||
isc_buffer_putstr(&buf, "/");
|
||||
}
|
||||
}
|
||||
|
||||
if (isc_buffer_availablelength(&buf) < strlen("keyset-"))
|
||||
fatal("directory name '%s' too long", dirname);
|
||||
isc_buffer_putstr(&buf, "keyset-");
|
||||
result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
|
||||
check_result(result, "dns_name_tofilenametext()");
|
||||
@ -161,7 +169,7 @@ logkey(dns_rdata_t *rdata)
|
||||
isc_result_t result;
|
||||
dst_key_t *key = NULL;
|
||||
isc_buffer_t buf;
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
|
||||
isc_buffer_init(&buf, rdata->data, rdata->length);
|
||||
isc_buffer_add(&buf, rdata->length);
|
||||
@ -176,43 +184,63 @@ logkey(dns_rdata_t *rdata)
|
||||
}
|
||||
|
||||
static void
|
||||
emitds(unsigned int dtype, dns_rdata_t *rdata)
|
||||
emit(unsigned int dtype, dns_rdata_t *rdata, char *lookaside)
|
||||
{
|
||||
isc_result_t result;
|
||||
unsigned char buf[DNS_DS_BUFFERSIZE];
|
||||
char text_buf[DST_KEY_MAXTEXTSIZE];
|
||||
char class_buf[10];
|
||||
isc_buffer_t textb, classb;
|
||||
isc_region_t r;
|
||||
dns_rdata_t ds;
|
||||
isc_result_t result;
|
||||
unsigned char buf[DNS_DS_BUFFERSIZE];
|
||||
char text_buf[DST_KEY_MAXTEXTSIZE];
|
||||
char name_buf[DNS_NAME_MAXWIRE];
|
||||
char class_buf[10];
|
||||
isc_buffer_t textb, nameb, classb;
|
||||
isc_region_t r;
|
||||
dns_rdata_t ds;
|
||||
|
||||
isc_buffer_init(&textb, text_buf, sizeof(text_buf));
|
||||
isc_buffer_init(&nameb, name_buf, sizeof(name_buf));
|
||||
isc_buffer_init(&classb, class_buf, sizeof(class_buf));
|
||||
|
||||
dns_rdata_init(&ds);
|
||||
|
||||
result = dns_ds_buildrdata(name, rdata, dtype, buf, &ds);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't build DS");
|
||||
fatal("can't build record");
|
||||
|
||||
result = dns_name_totext(name, ISC_FALSE, &nameb);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't print name");
|
||||
|
||||
/* Add lookaside origin, if set */
|
||||
if (lookaside != NULL) {
|
||||
if (isc_buffer_availablelength(&nameb) < strlen(lookaside))
|
||||
fatal("DLV origin '%s' is too long", lookaside);
|
||||
isc_buffer_putstr(&nameb, lookaside);
|
||||
if (lookaside[strlen(lookaside) - 1] != '.') {
|
||||
if (isc_buffer_availablelength(&nameb) < 1)
|
||||
fatal("DLV origin '%s' is too long", lookaside);
|
||||
isc_buffer_putstr(&nameb, ".");
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_rdata_totext(&ds, (dns_name_t *) NULL, &textb);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't print DS rdata");
|
||||
fatal("can't print rdata");
|
||||
|
||||
result = dns_rdataclass_totext(rdclass, &classb);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't print DS class");
|
||||
fatal("can't print class");
|
||||
|
||||
result = dns_name_print(name, stdout);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't print DS name");
|
||||
isc_buffer_usedregion(&nameb, &r);
|
||||
fwrite(r.base, 1, r.length, stdout);
|
||||
|
||||
putchar(' ');
|
||||
|
||||
isc_buffer_usedregion(&classb, &r);
|
||||
fwrite(r.base, 1, r.length, stdout);
|
||||
|
||||
printf(" DS ");
|
||||
if (lookaside == NULL)
|
||||
printf(" DS ");
|
||||
else
|
||||
printf(" DLV ");
|
||||
|
||||
isc_buffer_usedregion(&textb, &r);
|
||||
fwrite(r.base, 1, r.length, stdout);
|
||||
@ -223,7 +251,7 @@ static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, " %s options keyfile\n\n", program);
|
||||
fprintf(stderr, " %s options [-c class] [-d dir] -s dnsname\n\n",
|
||||
fprintf(stderr, " %s options [-c class] [-d dir] [-l lookaside] -s dnsname\n\n",
|
||||
program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
fprintf(stderr, "Options:\n");
|
||||
@ -233,25 +261,27 @@ usage(void) {
|
||||
fprintf(stderr, " -a algorithm: use algorithm\n");
|
||||
fprintf(stderr, "Keyset options:\n");
|
||||
fprintf(stderr, " -s: keyset mode\n");
|
||||
fprintf(stderr, " -l: add lookaside zone and print DLV records\n");
|
||||
fprintf(stderr, " -c class\n");
|
||||
fprintf(stderr, " -d directory\n");
|
||||
fprintf(stderr, "Output: DS RRs\n");
|
||||
fprintf(stderr, "Output: DS or DLV RRs\n");
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
char *algname = NULL, *classname = NULL, *dirname = NULL;
|
||||
char *endp;
|
||||
int ch;
|
||||
unsigned int dtype = DNS_DSDIGEST_SHA1;
|
||||
isc_boolean_t both = ISC_TRUE;
|
||||
isc_boolean_t usekeyset = ISC_FALSE;
|
||||
isc_result_t result;
|
||||
isc_log_t *log = NULL;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dns_rdata_t rdata;
|
||||
char *algname = NULL, *classname = NULL, *dirname = NULL;
|
||||
char *lookaside = NULL;
|
||||
char *endp;
|
||||
int ch;
|
||||
unsigned int dtype = DNS_DSDIGEST_SHA1;
|
||||
isc_boolean_t both = ISC_TRUE;
|
||||
isc_boolean_t usekeyset = ISC_FALSE;
|
||||
isc_result_t result;
|
||||
isc_log_t *log = NULL;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dns_rdata_t rdata;
|
||||
|
||||
dns_rdata_init(&rdata);
|
||||
|
||||
@ -267,7 +297,7 @@ main(int argc, char **argv) {
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"12a:c:d:sv:Fh")) != -1) {
|
||||
"12a:c:d:l:sv:Fh")) != -1) {
|
||||
switch (ch) {
|
||||
case '1':
|
||||
dtype = DNS_DSDIGEST_SHA1;
|
||||
@ -286,6 +316,13 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
case 'd':
|
||||
dirname = isc_commandline_argument;
|
||||
if (strlen(dirname) == 0)
|
||||
fatal("dir must be a non-empty string");
|
||||
break;
|
||||
case 'l':
|
||||
lookaside = isc_commandline_argument;
|
||||
if (strlen(lookaside) == 0)
|
||||
fatal("lookaside must be a non-empty string");
|
||||
break;
|
||||
case 's':
|
||||
usekeyset = ISC_TRUE;
|
||||
@ -357,10 +394,10 @@ main(int argc, char **argv) {
|
||||
logkey(&rdata);
|
||||
|
||||
if (both) {
|
||||
emitds(DNS_DSDIGEST_SHA1, &rdata);
|
||||
emitds(DNS_DSDIGEST_SHA256, &rdata);
|
||||
emit(DNS_DSDIGEST_SHA1, &rdata, lookaside);
|
||||
emit(DNS_DSDIGEST_SHA256, &rdata, lookaside);
|
||||
} else
|
||||
emitds(dtype, &rdata);
|
||||
emit(dtype, &rdata, lookaside);
|
||||
}
|
||||
} else {
|
||||
unsigned char key_buf[DST_KEY_MAXSIZE];
|
||||
@ -369,10 +406,10 @@ main(int argc, char **argv) {
|
||||
DST_KEY_MAXSIZE, &rdata);
|
||||
|
||||
if (both) {
|
||||
emitds(DNS_DSDIGEST_SHA1, &rdata);
|
||||
emitds(DNS_DSDIGEST_SHA256, &rdata);
|
||||
emit(DNS_DSDIGEST_SHA1, &rdata, lookaside);
|
||||
emit(DNS_DSDIGEST_SHA256, &rdata, lookaside);
|
||||
} else
|
||||
emitds(dtype, &rdata);
|
||||
emit(dtype, &rdata, lookaside);
|
||||
}
|
||||
|
||||
if (dns_rdataset_isassociated(&keyset))
|
||||
|
@ -17,7 +17,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-dsfromkey.docbook,v 1.6 2008/11/07 13:54:11 jreed Exp $ -->
|
||||
<!-- $Id: dnssec-dsfromkey.docbook,v 1.7 2009/06/17 06:51:43 each Exp $ -->
|
||||
<refentry id="man.dnssec-dsfromkey">
|
||||
<refentryinfo>
|
||||
<date>November 29, 2008</date>
|
||||
@ -114,6 +114,17 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<option>domain</option> is appended to the name for each
|
||||
record in the set.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
|
@ -1,25 +1,24 @@
|
||||
<!--
|
||||
- Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
- Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and 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,
|
||||
- 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.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-dsfromkey.html,v 1.5 2008/11/08 01:11:47 tbox Exp $ -->
|
||||
<!-- $Id: dnssec-dsfromkey.html,v 1.6 2009/06/17 06:51:43 each Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>dnssec-dsfromkey</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="man.dnssec-dsfromkey"></a><div class="titlepage"></div>
|
||||
@ -33,14 +32,14 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code> {-s} [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-1</code>] [<code class="option">-2</code>] [<code class="option">-a <em class="replaceable"><code>alg</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>dir</code></em></code>] {dnsname}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543424"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id215105"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-dsfromkey</strong></span>
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||
RFC 3658 and RFC 4509, for the given key(s).
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543435"></a><h2>OPTIONS</h2>
|
||||
<a name="id215118"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-1</span></dt>
|
||||
<dd><p>
|
||||
@ -61,6 +60,12 @@
|
||||
<dd><p>
|
||||
Sets the debugging level.
|
||||
</p></dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd><p>
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<code class="option">domain</code> is appended to the name for each
|
||||
record in the set.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s</span></dt>
|
||||
<dd><p>
|
||||
Keyset mode: in place of the keyfile name, the argument is
|
||||
@ -81,7 +86,7 @@
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543563"></a><h2>EXAMPLE</h2>
|
||||
<a name="id215271"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
To build the SHA-256 DS RR from the
|
||||
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
@ -96,7 +101,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543593"></a><h2>FILES</h2>
|
||||
<a name="id215301"></a><h2>FILES</h2>
|
||||
<p>
|
||||
The keyfile can be designed by the key identification
|
||||
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
|
||||
@ -110,13 +115,13 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543628"></a><h2>CAVEAT</h2>
|
||||
<a name="id215336"></a><h2>CAVEAT</h2>
|
||||
<p>
|
||||
A keyfile error can give a "file not found" even if the file exists.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543638"></a><h2>SEE ALSO</h2>
|
||||
<a name="id215346"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
@ -125,7 +130,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543674"></a><h2>AUTHOR</h2>
|
||||
<a name="id215382"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -13,188 +13,120 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: dnssec-keygen.8,v 1.40 2008/10/15 01:11:35 tbox Exp $
|
||||
.\" $Id: dnssec-keygen.8,v 1.41 2009/06/17 06:51:43 each Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dnssec\-keygen
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "DNSSEC\-KEYGEN" "8" "June 30, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
dnssec\-keygen \- DNSSEC key generation tool
|
||||
.\"Generated by db2man.xsl. Don't modify this, modify the source.
|
||||
.de Sh \" Subsection
|
||||
.br
|
||||
.if t .Sp
|
||||
.ne 5
|
||||
.PP
|
||||
\fB\\$1\fR
|
||||
.PP
|
||||
..
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Ip \" List item
|
||||
.br
|
||||
.ie \\n(.$>=3 .ne \\$3
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.TH "DNSSEC-KEYGEN" 8 "June 30, 2000" "" ""
|
||||
.SH NAME
|
||||
dnssec-keygen \- DNSSEC key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 14
|
||||
\fBdnssec\-keygen\fR {\-a\ \fIalgorithm\fR} {\-b\ \fIkeysize\fR} {\-n\ \fInametype\fR} [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-e\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-k\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
|
||||
\fBdnssec\-keygen\fR {\-a\ \fIalgorithm\fR} {\-b\ \fIkeysize\fR} {\-n\ \fInametype\fR} [\fB\-c\ \fIclass\fR\fR] [\fB\-e\fR] [\fB\-f\ \fIflag\fR\fR] [\fB\-g\ \fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-k\fR] [\fB\-p\ \fIprotocol\fR\fR] [\fB\-r\ \fIrandomdev\fR\fR] [\fB\-s\ \fIstrength\fR\fR] [\fB\-t\ \fItype\fR\fR] [\fB\-v\ \fIlevel\fR\fR] {name}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR
|
||||
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535 and RFC 4034. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845.
|
||||
\fBdnssec\-keygen\fR generates keys for DNSSEC (Secure DNS), as defined in RFC 2535 and RFC 4034\&. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
.TP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Selects the cryptographic algorithm. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of RSAMD5 (RSA) or RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, DH (Diffie Hellman), or HMAC\-MD5. These values are case insensitive.
|
||||
.sp
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm, and DSA is recommended. For TSIG, HMAC\-MD5 is mandatory.
|
||||
.sp
|
||||
Note 2: HMAC\-MD5 and DH automatically set the \-k flag.
|
||||
.RE
|
||||
.PP
|
||||
Selects the cryptographic algorithm\&. The value of \fBalgorithm\fR must be one of RSAMD5 (RSA) or RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, DH (Diffie Hellman), or HMAC\-MD5\&. These values are case insensitive\&. The default is RSASHA1 for DNSSEC key generation\&.
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm, and DSA is recommended\&. For TSIG, HMAC\-MD5 is mandatory\&.
|
||||
Note 2: HMAC\-MD5 and DH automatically set the \-k flag\&.
|
||||
.TP
|
||||
\-b \fIkeysize\fR
|
||||
.RS 4
|
||||
Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC\-MD5 keys must be between 1 and 512 bits.
|
||||
.RE
|
||||
.PP
|
||||
Specifies the number of bits in the key\&. The choice of key size depends on the algorithm used\&. RSAMD5 / RSASHA1 keys must be between 512 and 2048 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. DSA keys must be between 512 and 1024 bits and an exact multiple of 64\&. HMAC\-MD5 keys must be between 1 and 512 bits\&.
|
||||
When generating a DNSSEC key with the default algorithm, this
|
||||
value defaults to 1024, or 2048 if the KSK flag is set\&.
|
||||
.TP
|
||||
\-n \fInametype\fR
|
||||
.RS 4
|
||||
Specifies the owner type of the key. The value of
|
||||
\fBnametype\fR
|
||||
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are case insensitive. Defaults to ZONE for DNSKEY generation.
|
||||
.RE
|
||||
.PP
|
||||
Specifies the owner type of the key\&. The value of \fBnametype\fR must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
|
||||
.TP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Indicates that the DNS record containing the key should have the specified class. If not specified, class IN is used.
|
||||
.RE
|
||||
.PP
|
||||
Indicates that the DNS record containing the key should have the specified class\&. If not specified, class IN is used\&.
|
||||
.TP
|
||||
\-e
|
||||
.RS 4
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
.RE
|
||||
.PP
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent\&.
|
||||
.TP
|
||||
\-f \fIflag\fR
|
||||
.RS 4
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record. The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
.RE
|
||||
.PP
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record\&. The only recognized flag is KSK (Key Signing Key) DNSKEY\&.
|
||||
.TP
|
||||
\-g \fIgenerator\fR
|
||||
.RS 4
|
||||
If generating a Diffie Hellman key, use this generator. Allowed values are 2 and 5. If no generator is specified, a known prime from RFC 2539 will be used if possible; otherwise the default is 2.
|
||||
.RE
|
||||
.PP
|
||||
If generating a Diffie Hellman key, use this generator\&. Allowed values are 2 and 5\&. If no generator is specified, a known prime from RFC 2539 will be used if possible; otherwise the default is 2\&.
|
||||
.TP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec\-keygen\fR.
|
||||
.RE
|
||||
.PP
|
||||
Prints a short summary of the options and arguments to \fBdnssec\-keygen\fR\&.
|
||||
.TP
|
||||
\-k
|
||||
.RS 4
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
.RE
|
||||
.PP
|
||||
Generate KEY records rather than DNSKEY records\&.
|
||||
.TP
|
||||
\-p \fIprotocol\fR
|
||||
.RS 4
|
||||
Sets the protocol value for the generated key. The protocol is a number between 0 and 255. The default is 3 (DNSSEC). Other possible values for this argument are listed in RFC 2535 and its successors.
|
||||
.RE
|
||||
.PP
|
||||
Sets the protocol value for the generated key\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
|
||||
.TP
|
||||
\-r \fIrandomdev\fR
|
||||
.RS 4
|
||||
Specifies the source of randomness. If the operating system does not provide a
|
||||
\fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness is keyboard input.
|
||||
\fIrandomdev\fR
|
||||
specifies the name of a character device or file containing random data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR
|
||||
indicates that keyboard input should be used.
|
||||
.RE
|
||||
.PP
|
||||
Specifies the source of randomness\&. If the operating system does not provide a \fI/dev/random\fR or equivalent device, the default source of randomness is keyboard input\&. \fIrandomdev\fR specifies the name of a character device or file containing random data to be used instead of the default\&. The special value \fIkeyboard\fR indicates that keyboard input should be used\&.
|
||||
.TP
|
||||
\-s \fIstrength\fR
|
||||
.RS 4
|
||||
Specifies the strength value of the key. The strength is a number between 0 and 15, and currently has no defined purpose in DNSSEC.
|
||||
.RE
|
||||
.PP
|
||||
Specifies the strength value of the key\&. The strength is a number between 0 and 15, and currently has no defined purpose in DNSSEC\&.
|
||||
.TP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
Indicates the use of the key.
|
||||
\fBtype\fR
|
||||
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data.
|
||||
.RE
|
||||
.PP
|
||||
Indicates the use of the key\&. \fBtype\fR must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF\&. The default is AUTHCONF\&. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data\&.
|
||||
.TP
|
||||
\-v \fIlevel\fR
|
||||
.RS 4
|
||||
Sets the debugging level.
|
||||
.RE
|
||||
Sets the debugging level\&.
|
||||
.SH "GENERATED KEYS"
|
||||
.PP
|
||||
When
|
||||
\fBdnssec\-keygen\fR
|
||||
completes successfully, it prints a string of the form
|
||||
\fIKnnnn.+aaa+iiiii\fR
|
||||
to the standard output. This is an identification string for the key it has generated.
|
||||
.TP 4
|
||||
When \fBdnssec\-keygen\fR completes successfully, it prints a string of the form \fIKnnnn\&.+aaa+iiiii\fR to the standard output\&. This is an identification string for the key it has generated\&.
|
||||
.TP 3
|
||||
\(bu
|
||||
\fInnnn\fR
|
||||
is the key name.
|
||||
.TP 4
|
||||
\fInnnn\fR is the key name\&.
|
||||
.TP
|
||||
\(bu
|
||||
\fIaaa\fR
|
||||
is the numeric representation of the algorithm.
|
||||
.TP 4
|
||||
\fIaaa\fR is the numeric representation of the algorithm\&.
|
||||
.TP
|
||||
\(bu
|
||||
\fIiiiii\fR
|
||||
is the key identifier (or footprint).
|
||||
\fIiiiii\fR is the key identifier (or footprint)\&.
|
||||
.LP
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR
|
||||
creates two files, with names based on the printed string.
|
||||
\fIKnnnn.+aaa+iiiii.key\fR
|
||||
contains the public key, and
|
||||
\fIKnnnn.+aaa+iiiii.private\fR
|
||||
contains the private key.
|
||||
\fBdnssec\-keygen\fR creates two files, with names based on the printed string\&. \fIKnnnn\&.+aaa+iiiii\&.key\fR contains the public key, and \fIKnnnn\&.+aaa+iiiii\&.private\fR contains the private key\&.
|
||||
.PP
|
||||
The
|
||||
\fI.key\fR
|
||||
file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement).
|
||||
The \fI\&.key\fR file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement)\&.
|
||||
.PP
|
||||
The
|
||||
\fI.private\fR
|
||||
file contains algorithm\-specific fields. For obvious security reasons, this file does not have general read permission.
|
||||
The \fI\&.private\fR file contains algorithm\-specific fields\&. For obvious security reasons, this file does not have general read permission\&.
|
||||
.PP
|
||||
Both
|
||||
\fI.key\fR
|
||||
and
|
||||
\fI.private\fR
|
||||
files are generated for symmetric encryption algorithms such as HMAC\-MD5, even though the public and private key are equivalent.
|
||||
Both \fI\&.key\fR and \fI\&.private\fR files are generated for symmetric encryption algorithms such as HMAC\-MD5, even though the public and private key are equivalent\&.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
To generate a 768\-bit DSA key for the domain
|
||||
\fBexample.com\fR, the following command would be issued:
|
||||
To generate a 768\-bit DSA key for the domain \fBexample\&.com\fR, the following command would be issued:
|
||||
.PP
|
||||
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example.com\fR
|
||||
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example\&.com\fR
|
||||
.PP
|
||||
The command would print a string of the form:
|
||||
.PP
|
||||
\fBKexample.com.+003+26160\fR
|
||||
\fBKexample\&.com\&.+003+26160\fR
|
||||
.PP
|
||||
In this example,
|
||||
\fBdnssec\-keygen\fR
|
||||
creates the files
|
||||
\fIKexample.com.+003+26160.key\fR
|
||||
and
|
||||
\fIKexample.com.+003+26160.private\fR.
|
||||
In this example, \fBdnssec\-keygen\fR creates the files \fIKexample\&.com\&.+003+26160\&.key\fR and \fIKexample\&.com\&.+003+26160\&.private\fR\&.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec\-signzone\fR(8),
|
||||
BIND 9 Administrator Reference Manual,
|
||||
RFC 2539,
|
||||
RFC 2845,
|
||||
RFC 4033.
|
||||
\fBdnssec\-signzone\fR(8), BIND 9 Administrator Reference Manual, RFC 2539, RFC 2845, RFC 4033\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000\-2003 Internet Software Consortium.
|
||||
.br
|
||||
Internet Systems Consortium
|
||||
|
@ -29,7 +29,7 @@
|
||||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-keygen.c,v 1.83 2009/05/07 23:47:44 tbox Exp $ */
|
||||
/* $Id: dnssec-keygen.c,v 1.84 2009/06/17 06:51:43 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -67,6 +67,8 @@ static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 | NSEC3DSA |"
|
||||
" HMAC-SHA1 | HMAC-SHA224 | HMAC-SHA256 |"
|
||||
" HMAC-SHA384 | HMAC-SHA512";
|
||||
|
||||
#define DEFAULT_ALGORITHM "RSASHA1"
|
||||
|
||||
static isc_boolean_t
|
||||
dsa_size_ok(int size) {
|
||||
return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
|
||||
@ -75,11 +77,12 @@ dsa_size_ok(int size) {
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, " %s -a alg -b bits [-n type] [options] name\n\n",
|
||||
fprintf(stderr, " %s [options] name\n\n",
|
||||
program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
fprintf(stderr, "Required options:\n");
|
||||
fprintf(stderr, " -a algorithm: %s\n", algs);
|
||||
fprintf(stderr, " name: owner of the key\n");
|
||||
fprintf(stderr, "Options:\n");
|
||||
fprintf(stderr, " -a algorithm: %s (default RSASHA1)\n", algs);
|
||||
fprintf(stderr, " -b key size, in bits:\n");
|
||||
fprintf(stderr, " RSAMD5:\t\t[512..%d]\n", MAX_RSA);
|
||||
fprintf(stderr, " RSASHA1:\t\t[512..%d]\n", MAX_RSA);
|
||||
@ -93,10 +96,9 @@ usage(void) {
|
||||
fprintf(stderr, " HMAC-SHA256:\t[1..256]\n");
|
||||
fprintf(stderr, " HMAC-SHA384:\t[1..384]\n");
|
||||
fprintf(stderr, " HMAC-SHA512:\t[1..512]\n");
|
||||
fprintf(stderr, " (default 1024 for RSASHA1 ZSK, 2048 for KSK\n");
|
||||
fprintf(stderr, " -n nametype: ZONE | HOST | ENTITY | USER | OTHER\n");
|
||||
fprintf(stderr, " (DNSKEY generation defaults to ZONE\n");
|
||||
fprintf(stderr, " name: owner of the key\n");
|
||||
fprintf(stderr, "Other options:\n");
|
||||
fprintf(stderr, " (DNSKEY generation defaults to ZONE)\n");
|
||||
fprintf(stderr, " -c <class> (default: IN)\n");
|
||||
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
||||
fprintf(stderr, " -e use large exponent (RSAMD5/RSASHA1 only)\n");
|
||||
@ -122,7 +124,7 @@ usage(void) {
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
char *algname = NULL, *nametype = NULL, *type = NULL;
|
||||
char *algname = NULL, *nametype = NULL, *type = NULL;
|
||||
char *classname = NULL;
|
||||
char *endp;
|
||||
dst_key_t *key = NULL, *oldkey;
|
||||
@ -143,6 +145,7 @@ main(int argc, char **argv) {
|
||||
dns_rdataclass_t rdclass;
|
||||
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
||||
int dbits = 0;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
||||
if (argc == 1)
|
||||
usage();
|
||||
@ -252,9 +255,15 @@ main(int argc, char **argv) {
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("extraneous arguments");
|
||||
|
||||
if (algname == NULL)
|
||||
fatal("no algorithm was specified");
|
||||
if (strcasecmp(algname, "RSA") == 0) {
|
||||
if (algname == NULL) {
|
||||
algname = strdup(DEFAULT_ALGORITHM);
|
||||
use_default = ISC_TRUE;
|
||||
if (verbose > 0)
|
||||
fprintf(stderr, "no algorithm specified; "
|
||||
"defaulting to %s\n", algname);
|
||||
}
|
||||
|
||||
if (strcasecmp(algname, "RSA") == 0) {
|
||||
fprintf(stderr, "The use of RSA (RSAMD5) is not recommended.\n"
|
||||
"If you still wish to use RSA (RSAMD5) please "
|
||||
"specify \"-a RSAMD5\"\n");
|
||||
@ -303,8 +312,16 @@ main(int argc, char **argv) {
|
||||
fatal("invalid type %s", type);
|
||||
}
|
||||
|
||||
if (size < 0)
|
||||
fatal("key size not specified (-b option)");
|
||||
if (size < 0) {
|
||||
if (use_default) {
|
||||
size = (ksk != 0) ? 2048 : 1024;
|
||||
if (verbose > 0)
|
||||
fprintf(stderr, "key size not specified; "
|
||||
"defaulting to %d\n", size);
|
||||
} else {
|
||||
fatal("key size not specified (-b option)");
|
||||
}
|
||||
}
|
||||
|
||||
switch (alg) {
|
||||
case DNS_KEYALG_RSAMD5:
|
||||
|
@ -18,7 +18,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-keygen.docbook,v 1.22 2008/10/14 14:32:50 jreed Exp $ -->
|
||||
<!-- $Id: dnssec-keygen.docbook,v 1.23 2009/06/17 06:51:43 each Exp $ -->
|
||||
<refentry id="man.dnssec-keygen">
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
@ -55,9 +55,9 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-keygen</command>
|
||||
<arg choice="req">-a <replaceable class="parameter">algorithm</replaceable></arg>
|
||||
<arg choice="req">-b <replaceable class="parameter">keysize</replaceable></arg>
|
||||
<arg choice="req">-n <replaceable class="parameter">nametype</replaceable></arg>
|
||||
<arg><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||
<arg ><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
|
||||
<arg><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-e</option></arg>
|
||||
<arg><option>-f <replaceable class="parameter">flag</replaceable></option></arg>
|
||||
@ -93,7 +93,8 @@
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<option>algorithm</option> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, NSEC3RSASHA1, NSEC3DSA, DH (Diffie Hellman), or HMAC-MD5.
|
||||
These values are case insensitive.
|
||||
These values are case insensitive. The default is RSASHA1 for
|
||||
DNSSEC key generation.
|
||||
</para>
|
||||
<para>
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
|
||||
@ -112,12 +113,15 @@
|
||||
<para>
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be
|
||||
between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
between 512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
</para>
|
||||
When generating a DNSSEC key with the default algorithm, this
|
||||
value defaults to 1024, or 2048 if the KSK flag is set.
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -160,7 +164,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -14,12 +14,12 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: dnssec-keygen.html,v 1.32 2008/10/15 01:11:35 tbox Exp $ -->
|
||||
<!-- $Id: dnssec-keygen.html,v 1.33 2009/06/17 06:51:43 each Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>dnssec-keygen</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="man.dnssec-keygen"></a><div class="titlepage"></div>
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> {-a <em class="replaceable"><code>algorithm</code></em>} {-b <em class="replaceable"><code>keysize</code></em>} {-n <em class="replaceable"><code>nametype</code></em>} [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-e</code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k</code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {name}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543477"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id215159"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-keygen</strong></span>
|
||||
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
|
||||
and RFC 4034. It can also generate keys for use with
|
||||
@ -40,7 +40,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543489"></a><h2>OPTIONS</h2>
|
||||
<a name="id215172"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
@ -48,7 +48,8 @@
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<code class="option">algorithm</code> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, NSEC3RSASHA1, NSEC3DSA, DH (Diffie Hellman), or HMAC-MD5.
|
||||
These values are case insensitive.
|
||||
These values are case insensitive. The default is RSASHA1 for
|
||||
DNSSEC key generation.
|
||||
</p>
|
||||
<p>
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
|
||||
@ -60,15 +61,20 @@
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
|
||||
<dd><p>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be
|
||||
between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
between 512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
</p></dd>
|
||||
</p>
|
||||
When generating a DNSSEC key with the default algorithm, this
|
||||
value defaults to 1024, or 2048 if the KSK flag is set.
|
||||
<p>
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the owner type of the key. The value of
|
||||
@ -91,7 +97,7 @@
|
||||
<dt><span class="term">-f <em class="replaceable"><code>flag</code></em></span></dt>
|
||||
<dd><p>
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
</p></dd>
|
||||
<dt><span class="term">-g <em class="replaceable"><code>generator</code></em></span></dt>
|
||||
<dd><p>
|
||||
@ -148,7 +154,7 @@
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543824"></a><h2>GENERATED KEYS</h2>
|
||||
<a name="id215469"></a><h2>GENERATED KEYS</h2>
|
||||
<p>
|
||||
When <span><strong class="command">dnssec-keygen</strong></span> completes
|
||||
successfully,
|
||||
@ -194,7 +200,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543906"></a><h2>EXAMPLE</h2>
|
||||
<a name="id215557"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
@ -215,7 +221,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543949"></a><h2>SEE ALSO</h2>
|
||||
<a name="id215599"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 2539</em>,
|
||||
@ -224,7 +230,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544049"></a><h2>AUTHOR</h2>
|
||||
<a name="id215629"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
/*%
|
||||
* Principal Author: Brian Wellington
|
||||
* $Id: dst_parse.c,v 1.16 2009/03/02 23:47:43 tbox Exp $
|
||||
* $Id: dst_parse.c,v 1.17 2009/06/17 06:51:44 each Exp $
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -498,6 +498,12 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
|
||||
case DST_ALG_HMACSHA512:
|
||||
fprintf(fp, "(HMAC_SHA512)\n");
|
||||
break;
|
||||
case DST_ALG_NSEC3DSA:
|
||||
fprintf(fp, "(NSEC3DSA)\n");
|
||||
break;
|
||||
case DST_ALG_NSEC3RSASHA1:
|
||||
fprintf(fp, "(NSEC3RSASHA1)\n");
|
||||
break;
|
||||
default:
|
||||
fprintf(fp, "(?)\n");
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user