ldns(3)
π ldns β the ldns(3) era π
okay so bestie, welcome to ldns(3) from the Library Functions Manual. this is the DNSSEC signing corner of libldns and honestly it's giving "i have seven functions and every single one of them is about making your zone cryptographically un-fakeable." let's get into it π
β¨ NAME β¨
ldns_dnssec_zone_sign, ldns_dnssec_zone_sign_nsec3, ldns_dnssec_zone_mark_glue, ldns_dnssec_name_node_next_nonglue, ldns_dnssec_zone_create_nsecs, ldns_dnssec_remove_signatures, ldns_dnssec_zone_create_rrsigs β sign ldns_dnssec_zone π
π SYNOPSIS π
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
ldns_status ldns_dnssec_zone_sign(ldns_dnssec_zone *zone, ldns_rr_list
*new_rrs, ldns_key_list *key_list, int (*func)(ldns_rr *, void *), void
*arg);
ldns_status ldns_dnssec_zone_sign_nsec3(ldns_dnssec_zone *zone,
ldns_rr_list *new_rrs, ldns_key_list *key_list, int (*func)(ldns_rr *,
void *), void *arg, uint8_t algorithm, uint8_t flags, uint16_t
iterations, uint8_t salt_length, uint8_t *salt);
ldns_dnssec_zone_mark_glue();
ldns_rbnode_t* ldns_dnssec_name_node_next_nonglue(ldns_rbnode_t *node);
ldns_status ldns_dnssec_zone_create_nsecs(ldns_dnssec_zone *zone,
ldns_rr_list *new_rrs);
ldns_dnssec_rrs* ldns_dnssec_remove_signatures(ldns_dnssec_rrs
*signatures, ldns_key_list *key_list, int (*func)(ldns_rr *, void *),
void *arg);
ldns_status ldns_dnssec_zone_create_rrsigs(ldns_dnssec_zone *zone,
ldns_rr_list *new_rrs, ldns_key_list *key_list, int (*func)(ldns_rr *,
void*), void *arg);
π DESCRIPTION π
seven functions, one mission: make the zone signed. buckle up.
π¦ ldns_dnssec_zone_sign()
signs the given zone with the given keys. that's the whole vibe. main character energy, zero drama.
zoneβ the zone to sign. the girl herself.key_listβ the list of keys to sign the zone with. yes plural, yes you can stack them.new_rrsβ newly created resource records are added to this list, so you can free them later. it's the "keep the receipt" list π§Ύfuncβ callback function that decides what to do with old signatures. this function takes anldns_rr*and an optionalvoid *argargument, and returns one of four values:LDNS_SIGNATURE_LEAVE_ADD_NEWβ leave the signature and add a new one for the corresponding keyLDNS_SIGNATURE_REMOVE_ADD_NEWβ remove the signature and replace is with a new one from the same keyLDNS_SIGNATURE_LEAVE_NO_ADDβ leave the signature and do not add a new one with the corresponding keyLDNS_SIGNATURE_REMOVE_NO_ADDβ remove the signature and do not replace
argβ optional argument for the callback function.
Returns LDNS_STATUS_OK on success, an error code otherwise. slay or fail, no in between π
πΈ ldns_dnssec_zone_sign_nsec3()
signs the given zone with the given new zone, with NSEC3. yes it says "new zone", that's the manpage's words, not mine, and we are respecting the source fr fr.
zoneβ the zone to sign.key_listβ the list of keys to sign the zone with.new_rrsβ newly created resource records are added to this list, to free them later.funcβ callback function that decides what to do with old signatures.argβ optional argument for the callback function.algorithmβ the NSEC3 hashing algorithm to use.flagsβ NSEC3 flags.iterationsβ the number of NSEC3 hash iterations to use.salt_lengthβ the length (in octets) of the NSEC3 salt.saltβ the NSEC3 salt data. π§ (it's literally called salt bestie)
Returns LDNS_STATUS_OK on success, an error code otherwise.
π ldns_dnssec_zone_mark_glue()
that's it. that's the entry. no args, no returns documented, just vibes. it marks glue. π
π ldns_dnssec_name_node_next_nonglue()
Finds the first dnssec_name node in the rbtree that is not occluded. and listen β it *does* return names that are partially occluded. the manpage is out here doing emphasis with asterisks and we're honoring that, no cap.
nodeβ the first node to check.- Returns the first node that has not been marked as glue, or
NULLif not found. (TODO: make thatLDNS_RBTREE_NULL?) β yeah, the original really did leave a TODO in the docs. iconic behavior honestly π
β ldns_dnssec_zone_create_nsecs()
Adds NSEC records to the given dnssec_zone.
zoneβ the zone to add the records to.new_rrsβldns_rr's created by this function are added to this rr list, so the caller can free them later.- Returns
LDNS_STATUS_OKon success, an error code otherwise.
π«Ά ldns_dnssec_remove_signatures()
remove signatures if callback function tells to. it's a "you first" situation. the callback is the boss here.
signaturesβ list of signatures to check, and possibly remove, depending on the value of the callback.key_listβ these are marked to be used or not, on the return value of the callback.funcβ this function is called to specify what to do with each signature (and corresponding key).argβ Optional argument for the callback function.- Returns s pointer to the new signatures rrs (the original passed to this function may have been removed).
β οΈ heads up: that "s pointer" typo is in the original and we are not "fixing" it, we're just gently acknowledging it. also fr note that the original rrs you passed in may have been removed β so don't go touching them after. π
π§ ldns_dnssec_zone_create_rrsigs()
Adds signatures to the zone. the actual RRSIG-maker. the whole point of the party.
zoneβ the zone to add RRSIG Resource Records to.new_rrsβ the RRSIG RRs that are created are also added to this list, so the caller can free them later.key_listβ list of keys to sign with.funcβ Callback function to decide what keys to use and what to do with old signatures.argβ Optional argument for the callback function.- Returns
LDNS_STATUS_OKon success, error otherwise.
π AUTHOR π
The ldns team at NLnet Labs. π absolute legends, no notes.
π REPORTING BUGS π
Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues. they want to hear from you bestie, it's not snitching, it's contributing π«Ά
π 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. read that again. NO WARRANTY. not even the obvious ones. π
π SEE ALSO π
ldns_dnssec_zone. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. go read the RFCs, iykyk πβ¨
π₯ REMARKS π₯
This manpage was automatically generated from the ldns source code. so if the prose is a little stiff, that's why β the robots wrote it, i just gave it a makeover π
and that's the whole page bestie!! written up on 30 May 2006, from ldns version era ldns(3), and yes it still hits the same π mwah, go sign some zones πβ¨
π¦ 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