gnutls_x509_tr..._add_trust_file(3)
π NAME π
gnutls_x509_trust_list_add_trust_file β okay bestie, this is an API function from the gnutls manual (yes, that gnutls, the TLS library, we're being fancy today β¨), and it's literally the girl whose whole job is adding trust files to your trust list π«Ά
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_trust_list_add_trust_file(gnutls_x509_trust_list_t list,
const char * ca_file, const char * crl_file, gnutls_x509_crt_fmt_t type,
unsigned int tl_flags, unsigned int tl_vflags);
π ARGUMENTS π
gnutls_x509_trust_list_t listβ the list, babes. The one we're adding stuff to πconst char * ca_fileβ a file holding a list of CAs. It's optional, so like, no pressure πΈconst char * crl_fileβ a file holding a list of CRLs. Also optional. Both or neither, your call β¨gnutls_x509_crt_fmt_t typeβ the format of the certificates. Gotta tell her what she's looking at πunsigned int tl_flagsβ flags fromgnutls_trust_list_flags_tunsigned int tl_vflagsβ these aregnutls_certificate_verify_flags, but only relevant if yourflagsspecifiesGNUTLS_TL_VERIFY_CRL. Otherwise, girl, they're just vibing π¦
π DESCRIPTION π
So what does she actually do. This function will add the given certificate authorities to the trusted list. That's the whole plot π¬
And plot twist β PKCS 11 URLs are also accepted, instead of files, by this function. Not just files, bestie, URLs too. We love versatility β¨
A PKCS 11 URL implies a trust database (and by that I mean a specially marked module in p11-kit, iykyk). And the URL "pkcs11:" implies all trust databases in the system β yes, all of them, she's ambitious π
β οΈ but listen closely: Only a single URL specifying trust databases can be set; they cannot be stacked with multiple calls. So don't go calling her twice thinking you're being efficient, because you're not, and she will not be stacking them for you π periodt.
π RETURNS π
The number of added elements is returned. That's it, that's the return value, she's telling you how many she brought home π«Ά
π SINCE π
3.1 β she's been iconic since 3.1, an OG π
π REPORTING BUGS π
Found a bug? Do not suffer in silence, tell the girlies:
- 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. Slay, honestly β no royalty, no drama, just free as in freedom π
π¦ 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 β no notes π
this was gnutls 3.8.13 energy, brought to you straight from the gnutls manual, 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