Blame doc/invoke-danetool.texi

Packit 549fdc
@node danetool Invocation
Packit 549fdc
@subsection Invoking danetool
Packit 549fdc
@pindex danetool
Packit 549fdc
@ignore
Packit 549fdc
#  -*- buffer-read-only: t -*- vi: set ro:
Packit 549fdc
#
Packit 549fdc
# DO NOT EDIT THIS FILE   (invoke-danetool.texi)
Packit 549fdc
#
Packit 549fdc
# It has been AutoGen-ed
Packit 549fdc
# From the definitions    ../src/danetool-args.def
Packit 549fdc
# and the template file   agtexi-cmd.tpl
Packit 549fdc
@end ignore
Packit 549fdc
Packit 549fdc
Packit 549fdc
Tool to generate and check DNS resource records for the DANE protocol.
Packit 549fdc
Packit 549fdc
This section was generated by @strong{AutoGen},
Packit 549fdc
using the @code{agtexi-cmd} template and the option descriptions for the @code{danetool} program.
Packit 549fdc
This software is released under the GNU General Public License, version 3 or later.
Packit 549fdc
Packit 549fdc
Packit 549fdc
@anchor{danetool usage}
Packit 549fdc
@subsubheading danetool help/usage (@option{--help})
Packit 549fdc
@cindex danetool help
Packit 549fdc
Packit 549fdc
This is the automatically generated usage text for danetool.
Packit 549fdc
Packit 549fdc
The text printed is the same whether selected with the @code{help} option
Packit 549fdc
(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
Packit 549fdc
the usage text by passing it through a pager program.
Packit 549fdc
@code{more-help} is disabled on platforms without a working
Packit 549fdc
@code{fork(2)} function.  The @code{PAGER} environment variable is
Packit 549fdc
used to select the program, defaulting to @file{more}.  Both will exit
Packit 549fdc
with a status code of 0.
Packit 549fdc
Packit 549fdc
@exampleindent 0
Packit 549fdc
@example
Packit 549fdc
danetool - GnuTLS DANE tool
Packit 549fdc
Usage:  danetool [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Packit 549fdc
Packit 549fdc
   -d, --debug=num            Enable debugging
Packit 549fdc
                                - it must be in the range:
Packit 549fdc
                                  0 to 9999
Packit 549fdc
   -V, --verbose              More verbose output
Packit 549fdc
                                - may appear multiple times
Packit 549fdc
       --infile=file          Input file
Packit 549fdc
                                - file must pre-exist
Packit 549fdc
       --outfile=str          Output file
Packit 549fdc
       --load-pubkey=str      Loads a public key file
Packit 549fdc
       --load-certificate=str Loads a certificate file
Packit 549fdc
       --dlv=str              Sets a DLV file
Packit 549fdc
       --hash=str             Hash algorithm to use for signing
Packit 549fdc
       --check=str            Check a host's DANE TLSA entry
Packit 549fdc
       --check-ee             Check only the end-entity's certificate
Packit 549fdc
       --check-ca             Check only the CA's certificate
Packit 549fdc
       --tlsa-rr              Print the DANE RR data on a certificate or public key
Packit 549fdc
                                - requires the option 'host'
Packit 549fdc
       --host=str             Specify the hostname to be used in the DANE RR
Packit 549fdc
       --proto=str            The protocol set for DANE data (tcp, udp etc.)
Packit 549fdc
       --port=str             The port or service to connect to, for DANE data
Packit 549fdc
       --app-proto=str        an alias for the 'starttls-proto' option
Packit 549fdc
       --starttls-proto=str   The application protocol to be used to obtain the server's certificate
Packit 549fdc
(https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)
Packit 549fdc
       --ca                   Whether the provided certificate or public key is a Certificate
Packit 549fdc
Authority
Packit 549fdc
       --x509                 Use the hash of the X.509 certificate, rather than the public key
Packit 549fdc
       --local                an alias for the 'domain' option
Packit 549fdc
                                - enabled by default
Packit 549fdc
       --domain               The provided certificate or public key is issued by the local domain
Packit 549fdc
                                - disabled as '--no-domain'
Packit 549fdc
                                - enabled by default
Packit 549fdc
       --local-dns            Use the local DNS server for DNSSEC resolving
Packit 549fdc
                                - disabled as '--no-local-dns'
Packit 549fdc
       --insecure             Do not verify any DNSSEC signature
Packit 549fdc
       --inder                Use DER format for input certificates and private keys
Packit 549fdc
                                - disabled as '--no-inder'
Packit 549fdc
       --inraw                an alias for the 'inder' option
Packit 549fdc
       --print-raw            Print the received DANE data in raw format
Packit 549fdc
                                - disabled as '--no-print-raw'
Packit 549fdc
       --quiet                Suppress several informational messages
Packit 549fdc
   -v, --version[=arg]        output version information and exit
Packit 549fdc
   -h, --help                 display extended usage information and exit
Packit 549fdc
   -!, --more-help            extended usage information passed thru pager
Packit 549fdc
Packit 549fdc
Options are specified by doubled hyphens and their name or by a single
Packit 549fdc
hyphen and the flag character.
Packit 549fdc
Packit 549fdc
Tool to generate and check DNS resource records for the DANE protocol.
Packit 549fdc
Packit 549fdc
@end example
Packit 549fdc
@exampleindent 4
Packit 549fdc
Packit 549fdc
@anchor{danetool debug}
Packit 549fdc
@subsubheading debug option (-d)
Packit 549fdc
Packit 549fdc
This is the ``enable debugging'' option.
Packit 549fdc
This option takes a number argument.
Packit 549fdc
Specifies the debug level.
Packit 549fdc
@anchor{danetool load-pubkey}
Packit 549fdc
@subsubheading load-pubkey option
Packit 549fdc
Packit 549fdc
This is the ``loads a public key file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This can be either a file or a PKCS #11 URL
Packit 549fdc
@anchor{danetool load-certificate}
Packit 549fdc
@subsubheading load-certificate option
Packit 549fdc
Packit 549fdc
This is the ``loads a certificate file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This can be either a file or a PKCS #11 URL
Packit 549fdc
@anchor{danetool dlv}
Packit 549fdc
@subsubheading dlv option
Packit 549fdc
Packit 549fdc
This is the ``sets a dlv file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This sets a DLV file to be used for DNSSEC verification.
Packit 549fdc
@anchor{danetool hash}
Packit 549fdc
@subsubheading hash option
Packit 549fdc
Packit 549fdc
This is the ``hash algorithm to use for signing'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512.
Packit 549fdc
@anchor{danetool check}
Packit 549fdc
@subsubheading check option
Packit 549fdc
Packit 549fdc
This is the ``check a host's dane tlsa entry'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
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.
Packit 549fdc
@anchor{danetool check-ee}
Packit 549fdc
@subsubheading check-ee option
Packit 549fdc
Packit 549fdc
This is the ``check only the end-entity's certificate'' option.
Packit 549fdc
Checks the end-entity's certificate only. Trust anchors or CAs are not considered.
Packit 549fdc
@anchor{danetool check-ca}
Packit 549fdc
@subsubheading check-ca option
Packit 549fdc
Packit 549fdc
This is the ``check only the ca's certificate'' option.
Packit 549fdc
Checks the trust anchor's and CA's certificate only. End-entities are not considered.
Packit 549fdc
@anchor{danetool tlsa-rr}
Packit 549fdc
@subsubheading tlsa-rr option
Packit 549fdc
Packit 549fdc
This is the ``print the dane rr data on a certificate or public key'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
must appear in combination with the following options:
Packit 549fdc
host.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
This command prints the DANE RR data needed to enable DANE on a DNS server.
Packit 549fdc
@anchor{danetool host}
Packit 549fdc
@subsubheading host option
Packit 549fdc
Packit 549fdc
This is the ``specify the hostname to be used in the dane rr'' option.
Packit 549fdc
This option takes a string argument @file{Hostname}.
Packit 549fdc
This command sets the hostname for the DANE RR.
Packit 549fdc
@anchor{danetool proto}
Packit 549fdc
@subsubheading proto option
Packit 549fdc
Packit 549fdc
This is the ``the protocol set for dane data (tcp, udp etc.)'' option.
Packit 549fdc
This option takes a string argument @file{Protocol}.
Packit 549fdc
This command specifies the protocol for the service set in the DANE data.
Packit 549fdc
@anchor{danetool app-proto}
Packit 549fdc
@subsubheading app-proto option
Packit 549fdc
Packit 549fdc
This is an alias for the @code{starttls-proto} option,
Packit 549fdc
@pxref{danetool starttls-proto, the starttls-proto option documentation}.
Packit 549fdc
Packit 549fdc
@anchor{danetool starttls-proto}
Packit 549fdc
@subsubheading starttls-proto option
Packit 549fdc
Packit 549fdc
This is the ``the application protocol to be used to obtain the server's certificate (https, ftp, smtp, imap, ldap, xmpp, lmtp, pop3, nntp, sieve, postgres)'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
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.
Packit 549fdc
@anchor{danetool ca}
Packit 549fdc
@subsubheading ca option
Packit 549fdc
Packit 549fdc
This is the ``whether the provided certificate or public key is a certificate authority'' option.
Packit 549fdc
Marks the DANE RR as a CA certificate if specified.
Packit 549fdc
@anchor{danetool x509}
Packit 549fdc
@subsubheading x509 option
Packit 549fdc
Packit 549fdc
This is the ``use the hash of the x.509 certificate, rather than the public key'' option.
Packit 549fdc
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.
Packit 549fdc
@anchor{danetool local}
Packit 549fdc
@subsubheading local option
Packit 549fdc
Packit 549fdc
This is an alias for the @code{domain} option,
Packit 549fdc
@pxref{danetool domain, the domain option documentation}.
Packit 549fdc
Packit 549fdc
@anchor{danetool domain}
Packit 549fdc
@subsubheading domain option
Packit 549fdc
Packit 549fdc
This is the ``the provided certificate or public key is issued by the local domain'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-domain.
Packit 549fdc
@item
Packit 549fdc
It is enabled by default.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
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.
Packit 549fdc
@anchor{danetool local-dns}
Packit 549fdc
@subsubheading local-dns option
Packit 549fdc
Packit 549fdc
This is the ``use the local dns server for dnssec resolving'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-local-dns.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
This option will use the local DNS server for DNSSEC.
Packit 549fdc
This is disabled by default due to many servers not allowing DNSSEC.
Packit 549fdc
@anchor{danetool insecure}
Packit 549fdc
@subsubheading insecure option
Packit 549fdc
Packit 549fdc
This is the ``do not verify any dnssec signature'' option.
Packit 549fdc
Ignores any DNSSEC signature verification results.
Packit 549fdc
@anchor{danetool inder}
Packit 549fdc
@subsubheading inder option
Packit 549fdc
Packit 549fdc
This is the ``use der format for input certificates and private keys'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-inder.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
The input files will be assumed to be in DER or RAW format. 
Packit 549fdc
Unlike options that in PEM input would allow multiple input data (e.g. multiple 
Packit 549fdc
certificates), when reading in DER format a single data structure is read.
Packit 549fdc
@anchor{danetool inraw}
Packit 549fdc
@subsubheading inraw option
Packit 549fdc
Packit 549fdc
This is an alias for the @code{inder} option,
Packit 549fdc
@pxref{danetool inder, the inder option documentation}.
Packit 549fdc
Packit 549fdc
@anchor{danetool print-raw}
Packit 549fdc
@subsubheading print-raw option
Packit 549fdc
Packit 549fdc
This is the ``print the received dane data in raw format'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-print-raw.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
This option will print the received DANE data.
Packit 549fdc
@anchor{danetool quiet}
Packit 549fdc
@subsubheading quiet option
Packit 549fdc
Packit 549fdc
This is the ``suppress several informational messages'' option.
Packit 549fdc
In that case on the exit code can be used as an indication of verification success
Packit 549fdc
@anchor{danetool exit status}
Packit 549fdc
@subsubheading danetool exit status
Packit 549fdc
Packit 549fdc
One of the following exit values will be returned:
Packit 549fdc
@table @samp
Packit 549fdc
@item 0 (EXIT_SUCCESS)
Packit 549fdc
Successful program execution.
Packit 549fdc
@item 1 (EXIT_FAILURE)
Packit 549fdc
The operation failed or the command syntax was not valid.
Packit 549fdc
@end table
Packit 549fdc
@anchor{danetool See Also}
Packit 549fdc
@subsubheading danetool See Also
Packit 549fdc
    certtool (1)
Packit 549fdc
@anchor{danetool Examples}
Packit 549fdc
@subsubheading danetool Examples
Packit 549fdc
@subsubheading DANE TLSA RR generation
Packit 549fdc
Packit 549fdc
To create a DANE TLSA resource record for a certificate (or public key) 
Packit 549fdc
that was issued localy and may or may not be signed by a CA use the following command.
Packit 549fdc
@example
Packit 549fdc
$ danetool --tlsa-rr --host www.example.com --load-certificate cert.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To create a DANE TLSA resource record for a CA signed certificate, which will
Packit 549fdc
be marked as such use the following command.
Packit 549fdc
@example
Packit 549fdc
$ danetool --tlsa-rr --host www.example.com --load-certificate cert.pem \
Packit 549fdc
  --no-domain
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
The former is useful to add in your DNS entry even if your certificate is signed 
Packit 549fdc
by a CA. That way even users who do not trust your CA will be able to verify your
Packit 549fdc
certificate using DANE.
Packit 549fdc
Packit 549fdc
In order to create a record for the CA signer of your certificate use the following.
Packit 549fdc
@example
Packit 549fdc
$ danetool --tlsa-rr --host www.example.com --load-certificate cert.pem \
Packit 549fdc
  --ca --no-domain
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To read a server's DANE TLSA entry, use:
Packit 549fdc
@example
Packit 549fdc
$ danetool --check www.example.com --proto tcp --port 443
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To verify an HTTPS server's DANE TLSA entry, use:
Packit 549fdc
@example
Packit 549fdc
$ danetool --check www.example.com --proto tcp --port 443 --load-certificate chain.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To verify an SMTP server's DANE TLSA entry, use:
Packit 549fdc
@example
Packit 549fdc
$ danetool --check www.example.com --proto tcp --starttls-proto=smtp --load-certificate chain.pem
Packit 549fdc
@end example