danetool(1)
β¨ NAME β¨
okay so bestie, meet danetool β that's section 1 of the manual, the User Commands corner of the world β and it is, no cap, the GnuTLS DANE tool. that's the name. short, sweet, iconic, periodt. π
π¦ SYNOPSIS π¦
here's the whole vibe of how you call her:
danetool [-flags] [-flag [value]] [--option-name[[=| ]value]]
and the one rule that is not negotiable:
All arguments must be options. like, every single thing you hand her has to be a flag. no stray positional args wandering in, we don't do that here. π
π DESCRIPTION π
so what does she actually do? she's the tool that generates and checks DNS resource records for the DANE protocol. that's it, that's the whole job description, and she ate. π₯
π OPTIONS π
okay here comes the big one, the whole menu, and yes I'm listing every single flag because we do not skip options in this house π«Ά
-d num,--debug=numβ Enable debugging. she wants an integer as her argument, and the value of num is constrained to being in the range 0 through 9999. it specifies the debug level. go higher, get more words. π’-V,--verboseβ More verbose output. she will simply say more things.--outfile=strβ Output file. where the goods go. π--load-pubkey=strβ Loads a public key file. and this can be either a file or a PKCS #11 URL, so flexible of her. π--load-certificate=strβ Loads a certificate file. again: either a file or a PKCS #11 URL. π«--dlv=strβ Sets a DLV file. this sets a DLV file to be used for DNSSEC verification.--hash=strβ Hash algorithm to use for signing. the available hash functions areSHA1,RMD160,SHA256,SHA384,SHA512. pick your fighter β¨--check=strβ Check a host's DANE TLSA entry. she 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, otherwisedanetoolwill connect to the server to obtain it. the exit code on verification success will be zero. π--check-eeβ Check only the end-entity's certificate. only the end-entity's cert, bestie. trust anchors or CAs are not considered. nope, not invited. π«--check-caβ Check only the CA's certificate. she checks the trust anchor's and CA's certificate only. end-entities are not considered. ποΈ--tlsa-rrβ Print the DANE RR data on a certificate or public key. this option must appear in combination with the following options:host. this command prints the DANE RR data needed to enable DANE on a DNS server. π--host=hostnameβ Specify the hostname to be used in the DANE RR. this command sets the hostname for the DANE RR. π--proto=protocolβ The protocol set for DANE data (tcp,udpetc.). this command specifies the protocol for the service set in the DANE data.--port=strβ The port or service to connect to, for DANE data. π--app-protoβ this is an alias for the--starttls-protooption.--starttls-proto=strβ The application protocol to be used to obtain the server's certificate (https,ftp,smtp,imap,ldap,xmpp,lmtp,pop3,nntp,sieve,postgres). when the server's certificate isn't provided,danetoolwill 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. π€--caβ Whether the provided certificate or public key is a Certificate Authority. marks the DANE RR as a CA certificate if specified. π--x509β Use the hash of the X.509 certificate, rather than the public key. 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β this is an alias for the--domainoption.--domain,--no-domainβ The provided certificate or public key is issued by the local domain. the--no-domainform will disable the option. this option is enabled by default. 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. π‘--local-dns,--no-local-dnsβ Use the local DNS server for DNSSEC resolving. the--no-local-dnsform will disable the option. this option will use the local DNS server for DNSSEC. this is disabled by default due to many servers not allowing DNSSEC. π--insecureβ Do not verify any DNSSEC signature. ignores any DNSSEC signature verification results. > insecure means insecure bestie β this is literally the "do not verify" flag. π--inder,--no-inderβ Use DER format for input certificates and private keys. the--no-inderform will disable the 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β this is an alias for the--inderoption.--print-raw,--no-print-rawβ Print the received DANE data in raw format. the--no-print-rawform will disable the option. this option will print the received DANE data. π¨οΈ--quietβ Suppress several informational messages. in that case on the exit code can be used as an indication of verification success. π€«-v arg,--version=argβ Output version of program and exit. the default mode isv, a simple version. thecmode will print copyright information andnwill print the full copyright notice. βΉοΈ-h,--helpβ Display usage information and exit. the classic.-!,--more-helpβ Pass the extended usage information through a pager. for when you want the long version, in a pager, like a scholar. π
π EXAMPLES π
DANE TLSA RR generation
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.
$ 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 an HTTPS server's DANE TLSA entry, use:
$ danetool --check www.example.com --proto tcp --port 443 --load-certificate chain.pem
to verify an SMTP server's DANE TLSA entry, use:
$ danetool --check www.example.com --proto tcp --starttls-proto=smtp --load-certificate chain.pem
β EXIT STATUS β
one of the following exit values will be returned, and yes we care about them, exit codes are the love language of shell scripts:
0(EXIT_SUCCESS) β Successful program execution. slay. π1(EXIT_FAILURE) β The operation failed or the command syntax was not valid. π
π¦ SEE ALSO π¦
certtool(1) β her sibling, go say hi. π
π§ AUTHORS π§
so this section is, um. it's empty. that's it. that's the whole section. no names listed. we simply do not have author entries here bestie π
π 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.
π BUGS π
Please send bug reports to: bugs@gnutls.org
found a bug? don't just scream into the void, tell the maintainers. they're lovely, promise. π
and that's the whole page, bestie! this was danetool, version 3.8.13, dated 29 Apr 2026 β go forth and DNSSEC responsibly, you're the main character now. πβ¨π
π¦ where this page comes from
- fedora 43: gnutls-utils 3.8.13-1.fc43 Β· GPL-3.0-or-later
- fedora 44: gnutls-utils 3.8.13-1.fc44 Β· GPL-3.0-or-later
- nixpkgs unstable: gnutls 3.8.13
- ubuntu stonking: gnutls-bin 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms