---
name: "ldns_dane_verify_rr"
section: "3"
platform: "linux"
package: "ldns"
version: "1.9.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ldns_dane_verify_rr"
---

# ldns\_dane\_verify\_rr(3)

TLSA RR verification functions

## NAME

ldns\_dane\_verify, ldns\_dane\_verify\_rr - TLSA RR verification functions

## SYNOPSIS

\#include \<stdint.h\>\
 \#include \<stdbool.h\>\

\#include \<ldns/ldns.h\>

ldns\_status ldns\_dane\_verify(const ldns\_rr\_list\* tlsas, X509\* cert, STACK\_OF(X509)\* extra\_certs, X509\_STORE\* pkix\_validation\_store);

ldns\_status ldns\_dane\_verify\_rr(const ldns\_rr\* tlsa\_rr, X509\* cert, STACK\_OF(X509)\* extra\_certs, X509\_STORE\* pkix\_validation\_store);

## DESCRIPTION

*ldns\_dane\_verify*() BEWARE!  We strongly recommend to use OpenSSL 1.1.0 dane verification functions instead of the ones provided by ldns.  When OpenSSL 1.1.0 was available ldns will use the OpenSSL 1.1.0 dane verification functions under the hood.  When ldns was linked with OpenSSL \< 1.1.0, this function will not be able to verify TLSA records with DANE-TA usage types.

BEWARE! The ldns dane verification functions do \*not\* do server name checks.  The user has to perform additional server name checks themselves!

Verify if any of the given TLSA resource records matches the given certificate.

.br **tlsas**: The resource records that specify what and how to match the certificate. One must match for this function to succeed. With tlsas == NULL or the number of TLSA records in tlsas == 0, regular PKIX validation is performed. .br **cert**: The certificate to match (and validate) .br **extra\_certs**: Intermediate certificates that might be necessary creating the validation chain. .br **pkix\_validation\_store**: Used when the certificate usage is  "CA constraint" or "Service Certificate Constraint" to  validate the certificate.

.br Returns LDNS\_STATUS\_OK on success, LDNS\_STATUS\_DANE\_NEED\_OPENSSL\_GE\_1\_1\_FOR\_DANE\_TA when at least one of the TLSA's had usage type DANE-TA and none of the TLSA's matched or PKIX validated, LDNS\_STATUS\_DANE\_PKIX\_DID\_NOT\_VALIDATE when one of the TLSA's matched but the PKIX validation failed, LDNS\_STATUS\_DANE\_TLSA\_DID\_NOT\_MATCH when none of the TLSA's matched, or other ldns\_status errors.

*ldns\_dane\_verify\_rr*() BEWARE!  We strongly recommend to use OpenSSL 1.1.0 dane verification functions instead of the ones provided by ldns.  When OpenSSL 1.1.0 was available ldns will use the OpenSSL 1.1.0 dane verification functions under the hood.  When ldns was linked with OpenSSL \< 1.1.0, this function will not be able to verify TLSA records with DANE-TA usage types.

BEWARE! The ldns dane verification functions do \*not\* do server name checks.  The user has to perform additional server name checks themselves!

Verify if the given TLSA resource record matches the given certificate. Reporting on a TLSA rr mismatch (LDNS\_STATUS\_DANE\_TLSA\_DID\_NOT\_MATCH) is preferred over PKIX failure  (LDNS\_STATUS\_DANE\_PKIX\_DID\_NOT\_VALIDATE). So when PKIX validation is required by the TLSA Certificate usage, but the TLSA data does not match, LDNS\_STATUS\_DANE\_TLSA\_DID\_NOT\_MATCH is returned whether the PKIX validated or not.

When ldns is linked with OpenSSL \< 1.1.0 and this function is available, then the DANE-TA usage type will not be verified, and on a tlsa\_rr with this usage type, LDNS\_STATUS\_DANE\_NEED\_OPENSSL\_GE\_1\_1\_FOR\_DANE\_TA will be returned.

.br **tlsa\_rr**: The resource record that specifies what and how to match the certificate. With tlsa\_rr == NULL, regular PKIX validation is performed. .br **cert**: The certificate to match (and validate) .br **extra\_certs**: Intermediate certificates that might be necessary creating the validation chain. .br **pkix\_validation\_store**: Used when the certificate usage is  "CA constraint" or "Service Certificate Constraint" to  validate the certificate.

.br Returns LDNS\_STATUS\_OK on success, LDNS\_STATUS\_DANE\_NEED\_OPENSSL\_GE\_1\_1\_FOR\_DANE\_TA when the provided TLSA had the DANE-TA usage type, LDNS\_STATUS\_DANE\_TLSA\_DID\_NOT\_MATCH on TLSA data mismatch, LDNS\_STATUS\_DANE\_PKIX\_DID\_NOT\_VALIDATE when TLSA matched, but the PKIX validation failed, or other ldns\_status errors.

## AUTHOR

The ldns team at NLnet Labs.

## REPORTING BUGS

Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues

## COPYRIGHT

Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## SEE ALSO

*ldns\_dane\_create\_tlsa\_owner*, *ldns\_dane\_cert2rdf*, *ldns\_dane\_select\_certificate*, *ldns\_dane\_create\_tlsa\_rr*. And **perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034**  and **RFC4035**.

## REMARKS

This manpage was automatically generated from the ldns source code.
