gnutls_tdb_set_verify_func(3)
π gnutls_tdb_set_verify_func(3) π
okay bestie, welcome to the gnutls manual, page gnutls_tdb_set_verify_func(3). sit down, hydrate, and let's get into it π«Ά
β¨ NAME β¨
gnutls_tdb_set_verify_func β API function. that's it, that's the name, short and iconic π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
void gnutls_tdb_set_verify_func(gnutls_tdb_t tdb, gnutls_tdb_verify_func verify);
π ARGUMENTS π
gnutls_tdb_t tdbβ the trust storage. yes, the whole vibe holder ποΈgnutls_tdb_verify_func verifyβ the verification function. the little guy that does the actual checking β¨
π¦ DESCRIPTION π¦
so what this function does is, it associates a retrieval function with the trust storage structure. like, you're setting up the trust storage and telling it "hey, when you need to verify something, use this function, mwah π".
and the function you hand over has to be in this exact form:
int gnutls_tdb_verify_func(const char* db_name, const char* host, const char* service, const gnutls_datum_t* pubkey);
okay now listen closely because this part is important, no cap π
your verify function should return:
- zero on a match π
GNUTLS_E_CERTIFICATE_KEY_MISMATCHif there is a mismatch π- any other negative error code otherwise
and bestie β the db_name is the one you use to pass any private data to this function. that's literally its whole job. iykyk π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the devs:
- report bugs to <bugs@gnutls.org> π§
- 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. periodt π
π 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/
ngl, if you read all of that, you're genuinely the main character. go set up your verify function, you ate π
and that's the whole page, bestie β brought to you by gnutls version 3.8.13, from the gnutls manual set π§ stay slaying, drink water, and may all your returns be zero on a match π
π¦ 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