1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
|
.de1 NOP
. it 1 an-trap
. if \\n[.$] \,\\$*\/
..
.ie t \
.ds B-Font [CB]
.ds I-Font [CI]
.ds R-Font [CR]
.el \
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH danetool 1 "09 Jul 2025" "3.8.10" "User Commands"
.SH NAME
\f\*[B-Font]danetool\fP
\- GnuTLS DANE tool
.SH SYNOPSIS
\f\*[B-Font]danetool\fP
.\" Mixture of short (flag) options and long options
[\f\*[B-Font]\-flags\f[]]
[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
.sp \n(Ppu
.ne 2
All arguments must be options.
.sp \n(Ppu
.ne 2
.SH "DESCRIPTION"
Tool to generate and check DNS resource records for the DANE protocol.
.sp
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]num\f[], \f\*[B-Font]\-\-debug\f[]=\f\*[I-Font]num\f[]
Enable debugging.
This option takes an integer number as its argument.
The value of
\f\*[I-Font]num\f[]
is constrained to being:
.in +4
.nf
.na
in the range 0 through 9999
.fi
.in -4
.sp
Specifies the debug level.
.TP
.NOP \f\*[B-Font]\-V\f[], \f\*[B-Font]\-\-verbose\f[]
More verbose output.
.sp
.TP
.NOP \f\*[B-Font]\-\-outfile\f[]=\f\*[I-Font]str\f[]
Output file.
.sp
.TP
.NOP \f\*[B-Font]\-\-load\-pubkey\f[]=\f\*[I-Font]str\f[]
Loads a public key file.
.sp
This can be either a file or a PKCS #11 URL
.TP
.NOP \f\*[B-Font]\-\-load\-certificate\f[]=\f\*[I-Font]str\f[]
Loads a certificate file.
.sp
This can be either a file or a PKCS #11 URL
.TP
.NOP \f\*[B-Font]\-\-dlv\f[]=\f\*[I-Font]str\f[]
Sets a DLV file.
.sp
This sets a DLV file to be used for DNSSEC verification.
.TP
.NOP \f\*[B-Font]\-\-hash\f[]=\f\*[I-Font]str\f[]
Hash algorithm to use for signing.
.sp
Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512.
.TP
.NOP \f\*[B-Font]\-\-check\f[]=\f\*[I-Font]str\f[]
Check a host's DANE TLSA entry.
.sp
Obtains the DANE TLSA entry from the given hostname and prints information. Note that the actual certificate of the host can be provided using \-\-load\-certificate, otherwise danetool will connect to the server to obtain it. The exit code on verification success will be zero.
.TP
.NOP \f\*[B-Font]\-\-check\-ee\f[]
Check only the end-entity's certificate.
.sp
Checks the end\-entity's certificate only. Trust anchors or CAs are not considered.
.TP
.NOP \f\*[B-Font]\-\-check\-ca\f[]
Check only the CA's certificate.
.sp
Checks the trust anchor's and CA's certificate only. End\-entities are not considered.
.TP
.NOP \f\*[B-Font]\-\-tlsa\-rr\f[]
Print the DANE RR data on a certificate or public key.
This option must appear in combination with the following options:
host.
.sp
This command prints the DANE RR data needed to enable DANE on a DNS server.
.TP
.NOP \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]hostname\f[]
Specify the hostname to be used in the DANE RR.
.sp
This command sets the hostname for the DANE RR.
.TP
.NOP \f\*[B-Font]\-\-proto\f[]=\f\*[I-Font]protocol\f[]
The protocol set for DANE data (tcp, udp etc.).
.sp
This command specifies the protocol for the service set in the DANE data.
.TP
.NOP \f\*[B-Font]\-\-port\f[]=\f\*[I-Font]str\f[]
The port or service to connect to, for DANE data.
.sp
.TP
.NOP \f\*[B-Font]\-\-app\-proto\f[]
This is an alias for the \fI--starttls-proto\fR option.
.TP
.NOP \f\*[B-Font]\-\-starttls\-proto\f[]=\f\*[I-Font]str\f[]
The application protocol to be used to obtain the server's certificate (https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres).
.sp
When the server's certificate isn't provided danetool will connect to the server to obtain the certificate. In that case it is required to know the protocol to talk with the server prior to initiating the TLS handshake.
.TP
.NOP \f\*[B-Font]\-\-ca\f[]
Whether the provided certificate or public key is a Certificate Authority.
.sp
Marks the DANE RR as a CA certificate if specified.
.TP
.NOP \f\*[B-Font]\-\-x509\f[]
Use the hash of the X.509 certificate, rather than the public key.
.sp
This option forces the generated record to contain the hash of the full X.509 certificate. By default only the hash of the public key is used.
.TP
.NOP \f\*[B-Font]\-\-local\f[]
This is an alias for the \fI--domain\fR option.
.TP
.NOP \f\*[B-Font]\-\-domain\f[], \f\*[B-Font]\-\-no\-domain\f[]
The provided certificate or public key is issued by the local domain.
The \fIno\-domain\fP form will disable the option.
This option is enabled by default.
.sp
DANE distinguishes certificates and public keys offered via the DNSSEC to trusted and local entities. This flag indicates that this is a domain\-issued certificate, meaning that there could be no CA involved.
.TP
.NOP \f\*[B-Font]\-\-local\-dns\f[], \f\*[B-Font]\-\-no\-local\-dns\f[]
Use the local DNS server for DNSSEC resolving.
The \fIno\-local\-dns\fP form will disable the option.
.sp
This option will use the local DNS server for DNSSEC.
This is disabled by default due to many servers not allowing DNSSEC.
.TP
.NOP \f\*[B-Font]\-\-insecure\f[]
Do not verify any DNSSEC signature.
.sp
Ignores any DNSSEC signature verification results.
.TP
.NOP \f\*[B-Font]\-\-inder\f[], \f\*[B-Font]\-\-no\-inder\f[]
Use DER format for input certificates and private keys.
The \fIno\-inder\fP form will disable the option.
.sp
The input files will be assumed to be in DER or RAW format.
Unlike options that in PEM input would allow multiple input data (e.g. multiple
certificates), when reading in DER format a single data structure is read.
.TP
.NOP \f\*[B-Font]\-\-inraw\f[]
This is an alias for the \fI--inder\fR option.
.TP
.NOP \f\*[B-Font]\-\-print\-raw\f[], \f\*[B-Font]\-\-no\-print\-raw\f[]
Print the received DANE data in raw format.
The \fIno\-print\-raw\fP form will disable the option.
.sp
This option will print the received DANE data.
.TP
.NOP \f\*[B-Font]\-\-quiet\f[]
Suppress several informational messages.
.sp
In that case on the exit code can be used as an indication of verification success
.TP
.NOP \f\*[B-Font]\-v\f[] \f\*[I-Font]arg\f[], \f\*[B-Font]\-\-version\f[]=\f\*[I-Font]arg\f[]
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
.TP
.NOP \f\*[B-Font]\-h\f[], \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
.TP
.NOP \f\*[B-Font]\-!\f[], \f\*[B-Font]\-\-more\-help\f[]
Pass the extended usage information through a pager.
.sp
.SH EXAMPLES
.br
\fBDANE TLSA RR generation\fP
.br
.sp
To create a DANE TLSA resource record for a certificate (or public key)
that was issued locally and may or may not be signed by a CA use the following command.
.br
.in +4
.nf
$ danetool \-\-tlsa\-rr \-\-host www.example.com \-\-load\-certificate cert.pem
.in -4
.fi
.sp
To create a DANE TLSA resource record for a CA signed certificate, which will
be marked as such use the following command.
.br
.in +4
.nf
$ danetool \-\-tlsa\-rr \-\-host www.example.com \-\-load\-certificate cert.pem \
\-\-no\-domain
.in -4
.fi
.sp
The former is useful to add in your DNS entry even if your certificate is signed
by a CA. That way even users who do not trust your CA will be able to verify your
certificate using DANE.
.sp
In order to create a record for the CA signer of your certificate use the following.
.br
.in +4
.nf
$ danetool \-\-tlsa\-rr \-\-host www.example.com \-\-load\-certificate cert.pem \
\-\-ca \-\-no\-domain
.in -4
.fi
.sp
To read a server's DANE TLSA entry, use:
.br
.in +4
.nf
$ danetool \-\-check www.example.com \-\-proto tcp \-\-port 443
.in -4
.fi
.sp
To verify an HTTPS server's DANE TLSA entry, use:
.br
.in +4
.nf
$ danetool \-\-check www.example.com \-\-proto tcp \-\-port 443 \-\-load\-certificate chain.pem
.in -4
.fi
.sp
To verify an SMTP server's DANE TLSA entry, use:
.br
.in +4
.nf
$ danetool \-\-check www.example.com \-\-proto tcp \-\-starttls\-proto=smtp \-\-load\-certificate chain.pem
.in -4
.fi
.SH "EXIT STATUS"
One of the following exit values will be returned:
.TP
.NOP 0 " (EXIT_SUCCESS)"
Successful program execution.
.TP
.NOP 1 " (EXIT_FAILURE)"
The operation failed or the command syntax was not valid.
.PP
.SH "SEE ALSO"
certtool (1)
.SH "AUTHORS"
.SH "COPYRIGHT"
Copyright (C) 2020-2023 Free Software Foundation, and others all rights reserved.
This program is released under the terms of
the GNU General Public License, version 3 or later
.
.SH "BUGS"
Please send bug reports to: bugs@gnutls.org
|