ldns(3)

πŸ“¦
version 1.9.2 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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_new
  • ldns_key_new_frm_algorithm
  • ldns_key_new_frm_fp
  • ldns_key_new_frm_fp_l
  • ldns_key_new_frm_fp_rsa
  • ldns_key_new_frm_fp_rsa_l
  • ldns_key_new_frm_fp_dsa
  • ldns_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 use
  • size β€” the number of bytes for the keysize
  • Returns a new ldns_key structure 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 new ldns_key structure
  • fp β€” 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 new ldns_key structure
  • fp β€” the file pointer to use
  • line_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 NULL on 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 parse
  • line_nr β€” pointer to an integer containing the current line number (for debugging purposes)
  • Returns NULL on 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 NULL on 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 parse
  • line_nr β€” pointer to an integer containing the current line number (for debugging purposes)
  • Returns NULL on 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 (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 πŸ’