gnutls_x509_trust_list_add_crls(3)
π gnutls_x509_trust_list_add_crls(3) π
okay bestie, so this page lives in the gnutls manual, and it's literally the glow-up moment where you teach your trust list about certificate revocation lists. CRLs, for the uninitiated. yes, the messy part. let's get into it π
β¨ NAME β¨
gnutls_x509_trust_list_add_crls β it's an API function, babes. that's the whole name. π
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_trust_list_add_crls(gnutls_x509_trust_list_t list, const
gnutls_x509_crl_t * crl_list, unsigned crl_size, unsigned int flags,
unsigned int verification_flags);
like, copy that exactly, do not freestyle it, i am watching π
πΈ ARGUMENTS πΈ
gnutls_x509_trust_list_t listβ the list, bestie. the whole point. the main character.const gnutls_x509_crl_t * crl_listβ a list of CRLs. yes, a list inside a list, it's giving inception πunsigned crl_sizeβ the length of that CRL list. count them. all of them.unsigned int flagsβ flags fromgnutls_trust_list_flags_tunsigned int verification_flagsβgnutls_certificate_verify_flags, but ONLY ifflagsspecifiesGNUTLS_TL_VERIFY_CRL. otherwise it's just... sitting there. chilling.
π DESCRIPTION π
so what does this actually do? it adds the given certificate revocation lists to the trusted list. that's it. that's the function. slay π
β οΈ but listen: the CRLs incrl_listmust not be deinitialized during the lifetime oflist. not even a little. no cap. if you deinit them early you're on your own, and the vibes will be rancid.
also, this function must be called after gnutls_x509_trust_list_add_cas() β that's how the CRLs get verified for validity. it's an order-of-operations thing, and the order is not negotiable, fr fr.
now, if the flag GNUTLS_TL_NO_DUPLICATES is given, then the final CRL list will not contain duplicate entries. clean. tidy. iconic. β¨
and, hmm, here's the part that lowkey catches people: if the flag GNUTLS_TL_NO_DUPLICATES is given, gnutls_x509_trust_list_deinit() must be called with parameter all being 1. yes, 1. remember it. write it on your hand. π«Ά
if the flag GNUTLS_TL_VERIFY_CRL is given, the CRLs get verified before being added β and if verification fails, they get skipped. not added. ghosted. π
π RETURNS π
it returns the number of added elements. and heads up, that count includes duplicate entries. so don't come at me like "why is the number bigger than my list", bestie, that's literally documented. π
β SINCE β
3.0 β an elder. a legend. been here since the jump. π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the people:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π 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.
(translation: free to share, just keep the receipts π)
π 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. go forth and add those CRLs responsibly π β¨
this was brought to you by gnutls 3.8.13, mwah π
π¦ 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