GNUTLS_CERTIFICATE_SET_X509_TRUST(3)
π gnutls_certificate_set_x509_trust β like, the whole vibe β¨
okay bestie, so this is a page from the gnutls manual (that's the manual name, she's iconic, she's the whole TLS library) and we're about to get SO cozy with one specific function. buckle up π
πΈ NAME πΈ
gnutls_certificate_set_x509_trust β it's an API function, no cap π
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int gnutls_certificate_set_x509_trust(gnutls_certificate_credentials_t
res, gnutls_x509_crt_t * ca_list, int ca_list_size);
π¦ ARGUMENTS π¦
gnutls_certificate_credentials_t resβ bestie this is agnutls_certificate_credentials_ttype, that's literally what it is πgnutls_x509_crt_t * ca_listβ a list of trusted CAs, the little squad of certificate authorities you're trusting πint ca_list_sizeβ holds the size of the CA list, i.e. how many besties are in that squad π«Ά
π DESCRIPTION π
so here's the tea: this function adds the trusted CAs in order to verify client or server certificates. like, that's the whole job. π
in case of a client, this is not required to be called if the certificates are not verified using gnutls_certificate_verify_peers2(). so if you're not doing the peer-verifying thing, you can just... not. we love a low-effort moment π
and this function may be called multiple times. she's not a one-and-done situation, she's a "come back whenever, babe" situation β¨
in case of a server, the CAs set here will be sent to the client if a certificate request is sent. if you don't want that β like, you're feeling shy β this can be disabled using gnutls_certificate_send_x509_rdn_sequence(). π
π RETURNS π
the number of certificates processed β or a negative error code on error π (not the slay ending we wanted, but okay)
β SINCE β
2.4.0 β an OG, she's been here since 2.4.0, respect the elders π
π REPORTING BUGS π
found a bug? not me manifesting that, but if it happens, report bugs to <bugs@gnutls.org>. π§
home page: https://www.gnutls.org β go say hi, she's lovely πΈ
π 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. fr fr, that's the license, and it's giving generous β¨
π₯ 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 link bestie, go read the whole saga π
and that's the page!! π«Ά from the gnutls manual, version 3.8.13, gnutls_certificate_set_x509_trust(3) β mwah, periodt πβ¨π
π¦ 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