ldns(3)
π ldns(3) β TLSA RR creation functions π
ok so bestie, welcome to the ldns manual page β the TLSA RR creation corner of it, anyway. this is the part of the library that builds those DANE records you keep hearing about, and yes it's giving β¨cryptographic realnessβ¨. grab a strawberry drink, we're doing this π
β¨ NAME β¨
ldns_dane_create_tlsa_rr, ldns_dane_create_tlsa_owner, ldns_dane_cert2rdf, ldns_dane_select_certificate β the TLSA RR creation functions π
π SYNOPSIS π
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
ldns_status ldns_dane_create_tlsa_rr(ldns_rr** tlsa,
ldns_tlsa_certificate_usage certificate_usage, ldns_tlsa_selector
selector, ldns_tlsa_matching_type matching_type, X509* cert);
ldns_status ldns_dane_create_tlsa_owner(ldns_rdf** tlsa_owner, const
ldns_rdf* name, uint16_t port, ldns_dane_transport transport);
ldns_status ldns_dane_cert2rdf(ldns_rdf** rdf, X509* cert,
ldns_tlsa_selector selector, ldns_tlsa_matching_type matching_type);
ldns_status ldns_dane_select_certificate(X509** selected_cert, X509*
cert, STACK_OF(X509)* extra_certs, X509_STORE* pkix_validation_store,
ldns_tlsa_certificate_usage cert_usage, int index);
π DESCRIPTION π
π¦ ldns_dane_create_tlsa_rr()
ok so this one creates a TLSA resource record from the certificate. and bestie, listen: No PKIX validation is performed! like, none, zero, nada. the given certificate is used as data regardless of the value of certificate_usage. it does not care. it is not checking. it's just vibing and building a record π
tlsaβ the created TLSA resource record.certificate_usageβ the value for the Certificate Usage field.selectorβ the value for the Selector field.matching_typeβ the value for the Matching Type field.certβ the certificate which data will be represented.
returns LDNS_STATUS_OK on success, or an error code otherwise. periodt.
π ldns_dane_create_tlsa_owner()
this cutie creates a dname consisting of the given name, prefixed by the service port and type of transport:
_port._transport.name
tlsa_ownerβ the created dname.nameβ the dname that should be prefixed.portβ the service port number for which the name should be created.transportβ the transport for which the name should be created.
returns LDNS_STATUS_OK on success or an error code otherwise. π«Ά
πΈ ldns_dane_cert2rdf()
creates a LDNS_RDF_TYPE_HEX type rdf based on the binary data chosen by the selector and encoded using matching_type. it's giving "cert goes in, hex rdf comes out" energy π₯
rdfβ the created created rdf of typeLDNS_RDF_TYPE_HEX. (yes, the original really says "created created", we don't gatekeep, we preserve π)certβ the certificate from which the data is selected.selectorβ the full certificate or the public key.matching_typeβ the full data or theSHA256orSHA512hash of the selected data.
returns LDNS_STATUS_OK on success or an error code otherwise.
π ldns_dane_select_certificate()
selects the certificate from cert, extra_certs or the pkix_validation_store based on the value of cert_usage and index. this is the main character of the page honestly, look how many params she has π
selected_certβ the selected cert.certβ the certificate to validate (or not).extra_certsβ intermediate certificates that might be necessary during validation. May beNULL, except when the certificate usage is "Trust Anchor Assertion" because the trust anchor has to be provided. (otherwise choose a "Domain issued certificate!" β fr fr, no cap)pkix_validation_storeβ used when the certificate usage is "CA constraint" or "Service Certificate Constraint" to validate the certificate and, in case of "CA constraint", select the CA. whenpkix_validation_storeisNULL, validation is explicitly turned off and the behaviour is then the same as for "Trust anchor assertion" and "Domain issued certificate" respectively.cert_usageβ which certificate to use and how to validate.indexβ used to select the trust anchor when certificate usage is "Trust Anchor Assertion".0is the last certificate in the validation chain.1the one but last, etc. whenindexis-1, the last certificate is used that MUST be self-signed. this can help to make sure that the intended (self signed) trust anchor is actually present inextra_certs(which is a DANE requirement). π§
returns LDNS_STATUS_OK on success or an error code otherwise.
π AUTHOR π
The ldns team at NLnet Labs. icons, honestly π
π©· REPORTING BUGS π©·
found a bug bestie? spill. please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues β they wanna hear it π«Ά
π 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. like literally none, so don't come for them if it breaks π
β SEE ALSO β
ldns_dane_verify, ldns_dane_verify_rr. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. iykyk π
π REMARKS π
This manpage was automatically generated from the ldns source code. (not me being a bot-written page and still serving this much cunt π β¨)
and that's the whole page, bestie!! this was the ldns(3) library functions manual, dated 30 May 2006 β yeah she's vintage, she's iconic, she's still out here creating TLSA records. slay, stay safe, and always read your certificate usage values πππ
π¦ where this page comes from
- alpine 3.22: ldns-doc 1.8.4-r0 Β· BSD-3-Clause
- alpine 3.23: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- alpine 3.24: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- arch rolling: ldns 1.9.2-1 Β· custom:BSD
- debian trixie: libldns-dev 1.8.4-2+b1
- fedora 43: ldns-devel 1.8.4-8.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.8.4-8.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- nixos 26.05: ldns 1.9.2
- nixpkgs unstable: ldns 1.9.2
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- ubuntu questing: libldns-dev 1.8.4-2build1
- ubuntu resolute: libldns-dev 1.8.4-2build3
- ubuntu stonking: libldns-dev 1.9.2-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms