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 a gnutls_certificate_credentials_t type, 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 Β© 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