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 are SHA1, 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, otherwise danetool will 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, udp etc.). 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-proto option.
  • --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, 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. 🀝
  • --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 --domain option.
  • --domain, --no-domain β€” The provided certificate or public key is issued by the local domain. the --no-domain form 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-dns form 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-inder form 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 --inder option.
  • --print-raw, --no-print-raw β€” Print the received DANE data in raw format. the --no-print-raw form 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 is v, a simple version. the c mode will print copyright information and n will 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:

  1. 0 (EXIT_SUCCESS) β€” Successful program execution. slay. πŸŽ‰
  2. 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 (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