Skip to content
AZ Tools

TLSA Record Generator (DANE) & Checker

Turn a certificate into its TLSA records — every selector and matching type — and check an existing record against the certificate you are serving.

How to use

  1. Paste the certificate. PEM is the usual form, and raw DER as hex or base64 works too. Only the certificate is read — a private key is never needed for a TLSA record, and nothing is uploaded.
  2. Set the owner name from the port, the protocol and the host: a TLSA record lives at _443._tcp.example.com, not at example.com, and putting it at the bare name is the most common reason a record is simply never found.
  3. Choose usage, selector and matching type — 3 1 1 unless you have a reason. The table below shows every combination at once, so you can see what changes when the selector does.
  4. To debug a live deployment, paste the record you have published into the check box and the page will say whether it matches this certificate, and for which selector and matching type.

About this tool

Show

A TLSA record pins a certificate or a public key in DNS, which is what DANE is: instead of trusting whichever of a few hundred certificate authorities happens to sign for your name, a client fetches the record over DNSSEC and requires the certificate to match it. This page takes the certificate, computes the association data for every combination of selector and matching type, emits the record with its owner name, and — the part that actually gets used — tells you whether a record you already published still matches what you are serving.

Three numbers decide what a record means. Usage says whose authority the certificate rests on: 0 and 1 are PKIX, which require the certificate to validate through the public CA system as well as match the record, so a self-signed certificate fails them; 2 and 3 are DANE, which stand on their own. Selector says what is matched — the whole certificate, or just the SubjectPublicKeyInfo. Matching type says how — SHA-256, SHA-512, or the bytes themselves.

For almost every deployment the answer is 3 1 1, and the reason is operational rather than cryptographic. Selector 1 matches the public key, not the certificate, so a renewal that reuses the same key produces the same association data and the DNS record does not have to change. Selector 0 matches the certificate, so every renewal — including one that changes nothing but the dates — invalidates the record, and a record that goes stale does not degrade to unprotected: a DANE-aware client refuses the connection. Most DANE outages are exactly this.

Extracting the SubjectPublicKeyInfo is the step a tool can get subtly wrong, because it is not at a fixed offset. A certificate is a SEQUENCE whose first element is the TBSCertificate, itself a SEQUENCE of an optional explicit version, then the serial number, signature algorithm, issuer, validity and subject before the public key. The version is optional and defaults to v1, so the key is the sixth field after it or the sixth from the start — which is why this page walks the structure rather than counting bytes, and why its output is checked against the openssl command line for RSA, both P-256 and P-384, and Ed25519.

Where TLSA is worth the trouble is SMTP. RFC 7672 makes DANE the way a sending mail server decides whether to insist on TLS and which certificate to accept, and it is widely deployed there — it is what lets a receiving server be authenticated at all, given that SMTP has no equivalent of a browser address bar. For HTTPS no mainstream browser has ever shipped DANE validation, so an HTTPS TLSA record documents an intention rather than enforcing anything.

What the page does not check is everything outside the certificate. It does not fetch your DNS, so it cannot tell you the record is published, that the zone is signed, or that the parent has your DS — and without DNSSEC a TLSA record is advice an attacker can rewrite. It does not check the certificate dates either. Both belong to the deployment, not to the arithmetic.

Frequently asked questions

Which usage, selector and matching type should I use?

3 1 1 for nearly everything. Usage 3 (DANE-EE) means the certificate is trusted because the record says so, which works with a self-signed or private-CA certificate and does not depend on the public CA system. Selector 1 matches the public key, so a renewal that keeps the key needs no DNS change. Matching type 1 is SHA-256, which every implementation supports. RFC 7671 §5.1 says the same.

Why does my record stop working after a certificate renewal?

Because you used selector 0, which matches the whole certificate. Any renewal changes the certificate — at minimum the validity dates and the serial number — so the digest changes even if the key is identical. Switch to selector 1 and reuse the key across renewals, and the record stays valid. If you must use selector 0, publish both the old and the new record during the overlap: multiple TLSA records at one name are allowed and a client accepts a match against any of them.

Do I need DNSSEC for TLSA to do anything?

Yes, completely. A TLSA record that is not signed can be replaced in transit by whoever is attacking the connection, which makes it worse than useless — it tells a client to trust a certificate the attacker chose. DANE is defined as DNSSEC-validated, and clients that implement it will ignore an unsigned record. Get the zone signed and the DS published at the parent before relying on any of this.

Do browsers use TLSA?

No. No mainstream browser has ever shipped DANE validation, and several have explicitly declined to, largely because it adds a DNSSEC dependency to every connection. Where DANE is genuinely deployed is SMTP, under RFC 7672: a sending mail server that finds a signed TLSA record will require TLS and check the certificate against it, which is the only broadly deployed way to authenticate a receiving mail server.

Why does the SubjectPublicKeyInfo digest differ from what my other tool shows?

Check what the other tool hashed. The TLSA selector 1 body is the whole SubjectPublicKeyInfo — the algorithm identifier and its parameters as well as the key bits — not the bare public key and not the key modulus. It is the same structure openssl prints with x509 -pubkey and converts with pkey -pubin -outform der, and that is exactly what this page is checked against. HPKP-style pins used the same body, which is why those values match; a raw modulus fingerprint will not.

Related tools