GNUTLS_X509_TRUST_LIST_ADD_TRUST_DIR(3)

πŸ’– gnutls_x509_trust_list_add_trust_dir β€” the glow-up edition πŸ’–

okay bestie, so this is a page from the gnutls manual, and it's all about gnutls_x509_trust_list_add_trust_dir, which is literally the API function that yeets a whole directory of trust anchors into your trust list. no cap. let's get into it 🫢


✨ NAME ✨

gnutls_x509_trust_list_add_trust_dir β€” API function πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_trust_list_add_trust_list(gnutls_x509_trust_list_t list,
                                          const char * ca_dir,
                                          const char * crl_dir,
                                          gnutls_x509_crt_fmt_t type,
                                          unsigned int tl_flags,
                                          unsigned int tl_vflags);

wait no. bestie. let me not do that. the real one is:

#include <gnutls/x509.h>

int gnutls_x509_trust_list_add_trust_dir(gnutls_x509_trust_list_t list,
                                         const char * ca_dir,
                                         const char * crl_dir,
                                         gnutls_x509_crt_fmt_t type,
                                         unsigned int tl_flags,
                                         unsigned int tl_vflags);

periodt. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_trust_list_t list β€” the list itself, your main character. the trust list you're adding stuff to. πŸ‘‘
  • const char * ca_dir β€” a directory holding the CAs. it's optional, so no pressure if you don't have one. πŸŽ€
  • const char * crl_dir β€” a directory holding a list of CRLs. also optional. you're so free. πŸ¦‹
  • gnutls_x509_crt_fmt_t type β€” the format of the certificates. yes, the format, you have to tell it. πŸ™ˆ
  • unsigned int tl_flags β€” flags from gnutls_trust_list_flags_t. flags on flags, iconic. ✨
  • unsigned int tl_vflags β€” gnutls_certificate_verify_flags, but only if the flags specify GNUTLS_TL_VERIFY_CRL. so it's conditional, iykyk. πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

so basically this function adds the given certificate authorities to the trusted list. that's the whole job. she's efficient.

⚠️ but listen β€” only directories are accepted by this function. like, if you hand her a file, that's not it. directories only, no exceptions, she said what she said. πŸ’€

🌈 RETURNS 🌈

the number of added elements gets returned. so you get a lil count back, like a little receipt of how much she ate. 🧾✨


⭐ SINCE ⭐

3.3.6 β€” she's been around since 3.3.6, a certified classic. πŸ‘‘


πŸŽ€ REPORTING BUGS πŸŽ€

found a bug? don't be shy, tell the devs:


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.

(yes bestie, you can copy it, just keep the notice. it's giving generous. 🫢)


🌸 SEE ALSO 🌸

the full documentation for gnutls is maintained as a Texinfo manual. so if the /usr/share/doc/gnutls/ directory does not contain the HTML form, go visit:

https://www.gnutls.org/manual/

like, that's the link. go there. slay. πŸ¦‹


and that's the whole page, bestie πŸ’… this was gnutls 3.8.13 β€” mwah, drink water, and may all your trust lists be verified. periodt. πŸŽ€βœ¨πŸ’–
πŸ“¦ where this page comes from