GNUTLS_CERTIFICATE_SET_X509_TRUST_FILE(3)
π gnutls_certificate_set_x509_trust_file β the NAME section, bestie π
gnutls_certificate_set_x509_trust_file β it's an API function, and it lives in the gnutls manual (section 3, the library-calls girlies π
).
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int
gnutls_certificate_set_x509_trust_file(gnutls_certificate_credentials_t
cred, const char * cafile, gnutls_x509_crt_fmt_t type);
okay so that's the whole shape of it, no cap π«Ά
π ARGUMENTS π
gnutls_certificate_credentials_t credβ this is literally just agnutls_certificate_credentials_ttype. that's the vibe, that's the whole thing πΈconst char * cafileβ a file holding the list of trusted CAs. it can be a DER or PEM list. slay π¦gnutls_x509_crt_fmt_t typeβ is it PEM or DER? that's it, that's the question π
π DESCRIPTION π
This function adds the trusted CAs, and the reason we're doing that is so we can verify client or server certificates. periodt.
In case of a client: you are not required to call this if the certificates aren't being verified using gnutls_certificate_verify_peers2(). and listen β this function may be called multiple times. yes bestie, you can stack it, it's giving β¨layersβ¨
In case of a server: the names of the CAs you set here get sent to the client if a certificate request is sent. and if you're like "ma'am I did not ask for that," you can disable it with gnutls_certificate_send_x509_rdn_sequence(). iconic opt-out π
okay and here's the fun part β this function can also accept URLs π In that case it will import all certificates that are marked as trusted. and ngl, the supported URLs are the ones indicated by gnutls_url_is_supported(). iykyk π
π₯ RETURNS π₯
the number of certificates processed. that's the count, bestie, take it and go π
π REPORTING BUGS π
found something cursed? Report bugs to <bugs@gnutls.org>. fr fr, they want to know.
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. keep the receipt, that's all we ask π
π 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!! this was gnutls 3.8.13 energy, from your fave manual-page girlie πβ¨π¦ take care of your trust files and your trust issues, 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