gnutls_tdb_set_store_func(3)

πŸ’– gnutls_tdb_set_store_func(3) β€” the gnutls manual, bestie edition πŸ’–

okay so you found your way into the gnutls man pages, and honestly? iconic. this one lives in the gnutls manual (section 3, library functions, we love a lowkey classic), and it's all about teaching your trust database where to stash stuff. let's get into it 🫢


✨ NAME ✨

gnutls_tdb_set_store_func β€” it's an API function, fr fr πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

void gnutls_tdb_set_store_func(gnutls_tdb_t tdb, gnutls_tdb_store_func
store);

like, yes, that's the whole thing. she's short and she knows it ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_tdb_t tdb β€” the trust storage. your lil database bestie, the one holding all the trust info πŸ‘‘
  • gnutls_tdb_store_func store β€” the storage function. this is the callback you're handing over so it can do the actual storing 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

so what this function does is it associates a storage function with the trust storage structure. literally matchmaking: the tdb meets the store function and now they're linked for life πŸ’–

the function you're passing in has to look like this:

int gnutls_tdb_store_func(const char* db_name, const char* host, const
char* service, time_t expiration, const gnutls_datum_t* pubkey);

and the important bit, the way that db_name is literally meant to be used to pass any private data to this function πŸ‘€ so if you were wondering "what's db_name for, bestie?" β€” that's your answer. private data goes there. no cap.


😭 REPORTING BUGS 😭

found a bug? don't be shy, report it:

they wanna hear from you, fr fr 🫢


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, yes, you can share it, 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/

that's the mothership. go there if you want the whole saga 🌈


and that's the page, bestie ✨ this one came from gnutls 3.8.13, so if you're running that version you're literally holding the exact same energy πŸ’œ k bye, go store some trust, you absolute main character πŸŒΈπŸ’…πŸŽ€

πŸ“¦ where this page comes from