gnutls_x509_trust_list_add_cas(3)

πŸ’– gnutls_x509_trust_list_add_cas(3) πŸ’–

okay bestie, so this one lives in the gnutls manual, and it's literally the function that lets you dump a whole squad of certificate authorities into your trust list. no cap. let's get into it 🫢


✨ NAME ✨

gnutls_x509_trust_list_add_cas β€” API function. it adds CAs. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_trust_list_add_cas(gnutls_x509_trust_list_t list, const
gnutls_x509_crt_t * clist, unsigned clist_size, unsigned int flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_trust_list_t list β€” the list, the moment, the main character. it's the trust list you're adding to ✨
  • const gnutls_x509_crt_t * clist β€” a list of CAs. yes it's plural, yes it's a whole group chat of them πŸ’–
  • unsigned clist_size β€” the length of the CA list. like, how many besties are we adding here πŸ¦‹
  • unsigned int flags β€” flags from gnutls_trust_list_flags_t, iykyk

πŸ’œ DESCRIPTION πŸ’œ

so what this does is: it adds the given certificate authorities to the trusted list. that's it, that's the slay. πŸ”₯

⚠️ but listen β€” the CAs in clist must not be deinitialized during the lifetime of list. do not do it. do not even think about it. the way that would break things... 😭

If the flag GNUTLS_TL_NO_DUPLICATES is specified, then this function will ensure that no duplicates will be present in the final trust list. no copy-paste energy allowed, periodt πŸ‘‘

If the flag GNUTLS_TL_NO_DUPLICATE_KEY is specified, then this function will ensure that no certificates with the same key are present in the final trust list. same key? we're not doing that here πŸ’€

🚨 If either GNUTLS_TL_NO_DUPLICATE_KEY or GNUTLS_TL_NO_DUPLICATES are given, gnutls_x509_trust_list_deinit() must be called with parameter all being 1. don't forget this one fr fr, it's giving mandatory.

⭐ RETURNS ⭐

The number of added elements is returned; that includes duplicate entries. so like, even the dupes get counted, which is honestly iconic of it 🌈


πŸ¦‹ SINCE πŸ¦‹

3.0.0 β€” old money, been here forever, still ate πŸ’–


πŸ“ REPORTING BUGS πŸ“

found a bug? spill the tea to <bugs@gnutls.org>. they wanna hear it πŸ™ˆ

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. very generous, very demure, very mindful πŸŽ€


πŸ’« 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 version 3.8.13 of gnutls_x509_trust_list_add_cas(3), mwah, go add some CAs responsibly πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from