gnutls_anti_re...et_add_function(3)

πŸ’– gnutls_anti_re...et_add_function πŸ’–

okay bestie, so this one lives in the gnutls manual and it's literally an API function. yes, the title got chopped mid-word, that's just how it is, we don't ask questions 🫢


✨ NAME ✨

gnutls_anti_replay_set_add_function β€” it's an API function, babe. that's the whole name.


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

void gnutls_anti_replay_set_add_function(gnutls_anti_replay_t
anti_replay, gnutls_db_add_func add_func);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_anti_replay_t anti_replay β€” bestie this is a gnutls_anti_replay_t type. that's it, that's the vibe.
  • gnutls_db_add_func add_func β€” and this one? it's the function. the function of the hour, the main character πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's what's happening. this sets the function that's gonna be used to store an entry if it's not already chillin' in the resumed sessions database. like, if the entry isn't there yet, this function rolls up and handles the storing, no cap.

so this function returns 0 if the entry gets successfully stored 😌 and a negative error code otherwise πŸ’€

and specifically β€” if the entry is already found in the database? it returns GNUTLS_E_DB_ENTRY_EXISTS. iconic behaviour honestly.

the arguments to the add_func are, and listen closely:

  • ptr: the pointer set with gnutls_anti_replay_set_ptr()
  • exp_time: the expiration time of the entry
  • key: a pointer to the key
  • data: a pointer to data to store

and the data that gets set by this function can be examined using gnutls_db_check_entry_expire_time() and gnutls_db_check_entry_time(). so if you ever need to peek at it later, you know exactly where to go πŸ”


⭐ SINCE ⭐

3.6.5 β€” vintage but make it slay.


πŸ’€ REPORTING BUGS πŸ’€

found a bug? don't suffer in silence bestie, report it to bugs@gnutls.org.

home page: https://www.gnutls.org


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. (yes, all of that, verbatim, we respect the legal girlies πŸ™)


🌈 SEE ALSO 🌈

the full documentation for gnutls is maintained as a Texinfo manual. so if the /usr/share/doc/gnutls/ directory does not contain the HTML form, go visit:

https://www.gnutls.org/manual/


ok that's the whole thing, nothing skipped, every option and argument and error code accounted for πŸ’– go store your entries, bestie ✨

and that's a wrap on this page from the gnutls manual, version 3.8.13, page name gnutls_anti_re...et_add_function. mwah, bye πŸŽ€πŸ’…πŸ¦‹

πŸ“¦ where this page comes from