ldns(3)
π ldns β NAME π
ok so bestie, welcome to ldns(3), the library functions manual for the ldns key-creation girlies β¨. This page is all about making a ldns_key β like, from scratch, from an algorithm, from a file pointer, whatever you need.
Here's the whole squad of functions on this page:
ldns_key_newldns_key_new_frm_algorithmldns_key_new_frm_fpldns_key_new_frm_fp_lldns_key_new_frm_fp_rsaldns_key_new_frm_fp_rsa_lldns_key_new_frm_fp_dsaldns_key_new_frm_fp_dsa_l
All of them: create a ldns_key. periodt π
β¨ SYNOPSIS β¨
like, include the headers first, obviously:
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
then the actual functions, no cap:
ldns_key* ldns_key_new(void);
ldns_key* ldns_key_new_frm_algorithm(ldns_signing_algorithm a, uint16_t
size);
ldns_status ldns_key_new_frm_fp(ldns_key **k, FILE *fp);
ldns_status ldns_key_new_frm_fp_l(ldns_key **k, FILE *fp, int *line_nr);
RSA* ldns_key_new_frm_fp_rsa(FILE *fp);
RSA* ldns_key_new_frm_fp_rsa_l(FILE *fp, int *line_nr);
DSA* ldns_key_new_frm_fp_dsa(FILE *fp);
DSA* ldns_key_new_frm_fp_dsa_l(FILE *fp, int *line_nr);
π DESCRIPTION π
okay so here's the tea on every single one of these π«Ά
πΈ ldns_key_new()
Creates a new empty key structure. like a blank canvas, main character energy β¨
- Returns a new
ldns_key *structure
πΈ ldns_key_new_frm_algorithm()
Creates a new key based on the algorithm. it's giving bespoke, it's giving custom π
aβ The algorithm to usesizeβ the number of bytes for the keysize- Returns a new
ldns_keystructure with the key
πΈ ldns_key_new_frm_fp()
Creates a new priv key based on the contents of the file pointed by fp.
The file should be in Private-key-format v1.x. don't try to be cute and feed it something else bestie π
kβ the newldns_keystructurefpβ the file pointer to use- Returns an error or
LDNS_STATUS_OK
πΈ ldns_key_new_frm_fp_l()
Creates a new private key based on the contents of the file pointed by fp.
The file should be in Private-key-format v1.x. same vibe check as above β¨
kβ the newldns_keystructurefpβ the file pointer to useline_nrβ pointer to an integer containing the current line number (for debugging purposes)- Returns an error or
LDNS_STATUS_OK
πΈ ldns_key_new_frm_fp_rsa()
frm_fp helper function. This function parses the remainder of the (RSA) priv. key file generated from bind9.
fpβ the file to parse- Returns
NULLon failure otherwise a RSA structure
πΈ ldns_key_new_frm_fp_rsa_l()
frm_fp helper function. This function parses the remainder of the (RSA) priv. key file generated from bind9.
fpβ the file to parseline_nrβ pointer to an integer containing the current line number (for debugging purposes)- Returns
NULLon failure otherwise a RSA structure
πΈ ldns_key_new_frm_fp_dsa()
frm_fp helper function. This function parses the remainder of the (DSA) priv. key file.
fpβ the file to parse- Returns
NULLon failure otherwise a RSA structure
not me noticing it says RSA on a DSA function π that's literally what the original says, so we're keeping it exactly as-is, no edits, no notes π
πΈ ldns_key_new_frm_fp_dsa_l()
frm_fp helper function. This function parses the remainder of the (DSA) priv. key file.
fpβ the file to parseline_nrβ pointer to an integer containing the current line number (for debugging purposes)- Returns
NULLon failure otherwise a RSA structure
same RSA-on-DSA situation π kept verbatim, bestie, we don't touch the facts π
π AUTHOR π
The ldns team at NLnet Labs. icons, honestly π
π¦ REPORTING BUGS π¦
Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues
like, if something's busted, tell the girlies π«Ά
π 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 bestie, NO WARRANTY π that's the whole point of the shouty caps, it's serious.
β SEE ALSO β
ldns_key. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
iykyk πβ¨
π REMARKS π
This manpage was automatically generated from the ldns source code.
yes it was machine-generated, and yes we still gave it a glow-up π
and that's the page, bestie π this was the ldns(3) manpage from the Library Functions Manual, dated 30 May 2006 β shoutout to the ldns girlies at NLnet Labs for the whole thing πβ¨π¦ slay, go make some keys, periodt π
π¦ 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