gnutls_x509_tr...dd_system_trust(3)

✨ NAME ✨

gnutls_x509_trust_list_add_system_trust β€” bestie, this is the API function that pulls your whole system's trust into the list πŸ’–

(also hi, this is from the gnutls manual, section 3, and the page header literally just says gnutls_x509_tr...dd_system_trust(3) which is giving "name too long for the terminal" energy πŸ’€)


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

int gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t
list, unsigned int tl_flags, unsigned int tl_vflags);

like look at that signature. three args. no notes. slay. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_trust_list_t list β€” ok so this is the structure of the list 🌸 the whole vibe holder, the main character, the place where the trusted CAs go to live.
  • unsigned int tl_flags β€” these are GNUTLS_TL_* flags, periodt ✨
  • unsigned int tl_vflags β€” these are gnutls_certificate_verify_flags 🫢 but ONLY if the flags you passed specify GNUTLS_TL_VERIFY_CRL. otherwise? not it. πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea β˜• this function adds the system's default trusted certificate authorities to the trusted list. like, it goes and grabs the CAs your machine already trusts and drops them right into your list. obsessed. πŸ”₯

ngl, on unsupported systems this function returns GNUTLS_E_UNIMPLEMENTED_FEATURE. so if it's giving nothing, that might be why 😭

and important bestie: this function implies the flag GNUTLS_TL_NO_DUPLICATES πŸ‘‘ like you didn't even ask for it, it just comes with. no dupes allowed, we don't do repeats here πŸ’…


🌈 RETURNS 🌈

The number of added elements, or a negative error code on error. that's it, that's the return. if it's a number, yay, that many things got added πŸŽ‰ if it's negative... it's giving error, not giving success. πŸ’€


⭐ SINCE ⭐

3.1 β€” so this has been around for a minute, it's a legacy icon and we respect it 🧚


πŸ“ REPORTING BUGS πŸ“

found a bug? spill it, fr fr:

Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org


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.

like, free to copy, just keep the receipts okay 🫢


🌸 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/

go read it, it's lowkey iconic πŸ“šβœ¨


and that's the whole page bestie, mwah πŸ’– this was the gnutls manual, version 3.8.13, section 3, page gnutls_x509_tr...dd_system_trust(3) β€” go forth and trust some CAs πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from