dane_query_to_raw_tlsa(3)
β¨ dane_query_to_raw_tlsa(3) β¨
okay bestie, welcome to the gnutls manual π this one's a section 3 page, so it's all about a C function β specifically dane_query_to_raw_tlsa. pull up a chair, we're doing DANE today π
πΈ NAME πΈ
dane_query_to_raw_tlsa β it's an API function, babes. that's the whole name section. iconic brevity π
β¨ SYNOPSIS β¨
#include <gnutls/dane.h>
int dane_query_to_raw_tlsa(dane_query_t q, unsigned int * data_entries,
char *** dane_data, int ** dane_data_len, int * secure, int * bogus);
look at that signature. six arguments. she's high maintenance but she delivers π«Ά
π¦ ARGUMENTS π¦
okay so here's the rundown on every single one of these, no skips:
dane_query_t qβ the query result structure. that's your main character right there πunsigned int * data_entriesβ pointer that gets set to the number of entries in the query. like, how many things are in there π’char *** dane_dataβ pointer to contain an array of DNS rdata items, terminated with aNULLpointer. > β οΈ important: the caller must guarantee that the referenced data remains valid untildane_query_deinit()is called. do not let this go stale bestie, it's giving dangling pointer energy πint ** dane_data_lenβ pointer to contain the length, in n bytes, of thedane_dataitems πint * secureβ pointer set true if the result is validated securely, false if validation failed or the domain queried has no security info. so like, true = we're good, false = either it flopped or there's just nothing to check π€·int * bogusβ pointer set true if the result was not secure due to a security failure. bogus is exactly what it sounds like and you should be paying attention when this one goes true π
π DESCRIPTION π
so this function will provide the DANE data from the query response. that's the job. that's what she does β¨
the pointers dane_data and dane_data_len are allocated with gnutls_malloc() to contain the data from the query result structure β and real talk, the individual dane_data items simply point to the original data and are not allocated separately. so it's not a full deep copy situation, it's more of a "here's where it lives" situation π«Ά
β οΈ and the returneddane_dataare only valid during the lifetime ofq. periodt. afterqis gone, so is your data. do not be out here using it afterwards π
π₯ RETURNS π₯
on success, DANE_E_SUCCESS (0) is returned. otherwise you get a negative error value, and that's your cue to go check what went wrong π
π REPORTING BUGS π
found a bug? report it to <bugs@gnutls.org> β they want to hear from you fr fr π
home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, go forth, just keep the receipts π
π SEE ALSO π
the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:
https://www.gnutls.org/manual/
and that's the whole page bestie, you ate that π this one's from gnutls version 3.8.13, page dane_query_to_raw_tlsa(3) β go forth and validate your TLSA records responsibly, mwah π
π
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms