danetool — GnuTLS DANE tool
danetool [ −flag [value] ...] [ −−opt−name [[=|]value] ...]
−d
number,
−−debug=numberEnable debugging.. This option takes an integer number as its argument. The value of number is constrained to being:
in the range 0 through 9999
Specifies the debug level.
−V,
−−verboseMore verbose output. This option may appear an unlimited number of times.
−−infile=fileInput file.
−−outfile=stringOutput file.
−−load−pubkey=stringLoads a public key file.
This can be either a file or a PKCS #11 URL
−−load−certificate=stringLoads a certificate file.
This can be either a file or a PKCS #11 URL
−−hash=stringHash algorithm to use for signing..
Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512.
−−check=stringCheck a host's DANE TLSA entry..
Obtains the DANE TLSA entry from the given hostname and prints information.
−−local−dns, −−no−local−dnsUse 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.
−−inder, −−no−inderUse 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.
−−inderThis is an alias for the inder option.
−−tlsa−rrPrint 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=hostnameSpecify the hostname to be used in the DANE RR.
This command sets the hostname for the DANE RR.
−−proto=protocolThe protocol set for DANE data (tcp, udp etc.).
This command specifies the protocol for the service set in the DANE data.
−−port=numberSpecify the port number for the DANE data.. This option takes an integer number as its argument.
−−caWhether the provided certificate or public key is a Certificate Authority..
Marks the DANE RR as a CA certificate if specified.
−−x509Use 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.
−−localThe provided certificate or public key is a local entity..
DANE distinguishes certificates and public keys offered via the DNSSEC to trusted and local entities. Use this flag if this is a local (and possibly unsigned) entity.
−h,
−−helpDisplay usage information and exit.
−!,
−−more−helpPass the extended usage information through a pager.
−v
[{v|c|n}],
−−version[={v|c|n}]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.
DANE TLSA RR generation
To create a DANE TLSA resource record for a CA signed certificate use the following commands.
$ danetool −−tlsa−rr −−host www.example.com −−load−certificate cert.pem
For a self signed certificate use:
$ danetool −−tlsa−rr −−host www.example.com −−load−certificate cert.pem −−local
The latter 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 signer of your certificate use:
$ danetool −−tlsa−rr −−host www.example.com −−load−certificate cert.pem −−ca
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
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.