Previous: ocsptool Invocation, Up: More on certificate authentication   [Contents][Index]


4.2.7 Invoking danetool

Tool to generate and check DNS resource records for the DANE protocol.

This section was generated by AutoGen, using the agtexi-cmd template and the option descriptions for the danetool program. This software is released under the GNU General Public License, version 3 or later.

danetool help/usage (--help)

This is the automatically generated usage text for danetool.

The text printed is the same whether selected with the help option (--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is used to select the program, defaulting to more. Both will exit with a status code of 0.

danetool - GnuTLS DANE tool
Usage:  danetool [ -<flag> [<val>] | --<name>[{=| }<val>] ]...

   -d, --debug=num            Enable debugging.
                                - it must be in the range:
                                  0 to 9999
   -V, --verbose              More verbose output
                                - may appear multiple times
       --infile=file          Input file
                                - file must pre-exist
       --outfile=str          Output file
       --load-pubkey=str      Loads a public key file
       --load-certificate=str Loads a certificate file
       --dlv=str              Sets a DLV file
       --hash=str             Hash algorithm to use for signing.
       --check=str            Check a host's DANE TLSA entry.
       --check-ee             Check only the end-entity's certificate.
       --check-ca             Check only the CA's certificate.
       --insecure             Do not verify any DNSSEC signature.
       --local-dns            Use the local DNS server for DNSSEC resolving.
                                - disabled as '--no-local-dns'
       --inder                Use DER format for input certificates and private keys.
                                - disabled as '--no-inder'
       --inraw                an alias for the 'inder' option
       --tlsa-rr              Print the DANE RR data on a certificate or public key
                                - requires the option 'host'
       --host=str             Specify the hostname to be used in the DANE RR
       --proto=str            The protocol set for DANE data (tcp, udp etc.)
       --port=num             Specify the port number for the DANE data.
       --ca                   Whether the provided certificate or public key is a Certificate
Authority.
       --x509                 Use the hash of the X.509 certificate, rather than the public key.
       --local                an alias for the 'domain' option
                                - enabled by default
       --domain               The provided certificate or public key is issued by the local domain.
                                - disabled as '--no-domain'
                                - enabled by default
   -v, --version[=arg]        output version information and exit
   -h, --help                 display extended usage information and exit
   -!, --more-help            extended usage information passed thru pager

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.

Tool to generate and check DNS resource records for the DANE protocol.

Please send bug reports to:  <bug-gnutls@gnu.org>

debug option (-d)

This is the “enable debugging.” option. This option takes an argument number. Specifies the debug level.

load-pubkey option

This is the “loads a public key file” option. This option takes an argument string. This can be either a file or a PKCS #11 URL

load-certificate option

This is the “loads a certificate file” option. This option takes an argument string. This can be either a file or a PKCS #11 URL

dlv option

This is the “sets a dlv file” option. This option takes an argument string. This sets a DLV file to be used for DNSSEC verification.

hash option

This is the “hash algorithm to use for signing.” option. This option takes an argument string. Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512.

check option

This is the “check a host’s dane tlsa entry.” option. This option takes an argument string. Obtains the DANE TLSA entry from the given hostname and prints information. Note that the actual certificate of the host has to be provided using –load-certificate.

check-ee option

This is the “check only the end-entity’s certificate.” option. Checks the end-entity’s certificate only. Trust anchors or CAs are not considered.

check-ca option

This is the “check only the ca’s certificate.” option. Checks the trust anchor’s and CA’s certificate only. End-entities are not considered.

insecure option

This is the “do not verify any dnssec signature.” option. Ignores any DNSSEC signature verification results.

local-dns option

This is the “use the local dns server for dnssec resolving.” option. This option will use the local DNS server for DNSSEC. This is disabled by default due to many servers not allowing DNSSEC.

inder option

This is the “use der format for input certificates and private keys.” option. 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.

inraw option

This is an alias for the inder option, see the inder option documentation.

tlsa-rr option

This is the “print the dane rr data on a certificate or public key” option.

This option has some usage constraints. It:

This command prints the DANE RR data needed to enable DANE on a DNS server.

host option

This is the “specify the hostname to be used in the dane rr” option. This option takes an argument string Hostname. This command sets the hostname for the DANE RR.

proto option

This is the “the protocol set for dane data (tcp, udp etc.)” option. This option takes an argument string Protocol. This command specifies the protocol for the service set in the DANE data.

ca option

This is the “whether the provided certificate or public key is a certificate authority.” option. Marks the DANE RR as a CA certificate if specified.

x509 option

This is the “use the hash of the x.509 certificate, rather than the public key.” option. 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.

local option

This is an alias for the domain option, see the domain option documentation.

domain option

This is the “the provided certificate or public key is issued by the local domain.” option.

This option has some usage constraints. It:

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.

danetool exit status

One of the following exit values will be returned:

0 (EXIT_SUCCESS)

Successful program execution.

1 (EXIT_FAILURE)

The operation failed or the command syntax was not valid.

danetool See Also

certtool (1)

danetool Examples

DANE TLSA RR generation

To create a DANE TLSA resource record for a certificate (or public key) that was issued localy and may or may not be signed by a CA use the following command.

$ danetool --tlsa-rr --host www.example.com --load-certificate cert.pem

To create a DANE TLSA resource record for a CA signed certificate, which will be marked as such use the following command.

$ danetool --tlsa-rr --host www.example.com --load-certificate cert.pem \
  --no-domain

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.

In order to create a record for the CA signer of your certificate use the following.

$ danetool --tlsa-rr --host www.example.com --load-certificate cert.pem \
  --ca --no-domain

To read a server’s DANE TLSA entry, use:

$ danetool --check www.example.com --proto tcp --port 443

To verify a server’s DANE TLSA entry, use:

$ danetool --check www.example.com --proto tcp --port 443 --load-certificate chain.pem

Previous: ocsptool Invocation, Up: More on certificate authentication   [Contents][Index]