gnutls_x509_cr...crl_dist_points(3)
β¨ gnutls_x509_cr...crl_dist_points β the gnutls_x509_crt_get_crl_dist_points(3) glow-up β¨
okay bestie, gather round, because we're diving into the gnutls manual (yes, that gnutls) and today's main character is gnutls_x509_crt_get_crl_dist_points. it's giving very much "where do I go to find out if this cert got revoked" energy. let's get into it π
πΈ NAME πΈ
gnutls_x509_crt_get_crl_dist_points β an API function, no cap. that's literally it. that's the whole name section. iconic.
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_crt_get_crl_dist_points(gnutls_x509_crt_t cert, unsigned
int seq, void * san, size_t * san_size, unsigned int * reason_flags,
unsigned int * critical);
so yeah, that's the whole call signature. she's a little long but she's worth it, fr fr. π¦
π ARGUMENTS π
gnutls_x509_crt_t certβ should contain agnutls_x509_crt_ttype. that's your cert, the whole point of this whole operation. she's the moment.unsigned int seqβ specifies the sequence number of the distribution point (0 for the first one, 1 for the second etc.). so like, they're numbered. starting at zero, because of course they are. classic zero-indexing behavior πvoid * sanβ is the place where the distribution point will be copied to. this is your lil output bucket. bring a big enough one or she WILL complain (see RETURNS, it's a whole thing).size_t * san_sizeβ holds the size ofret. yes bestie, the manpage saysrethere and the parameter is calledsan, and honestly we're just going to let that be. it holds the size. that's the vibe. πunsigned int * reason_flagsβ revocation reasons. an ORed sequence of flags fromgnutls_x509_crl_reason_flags_t. so you get to know why someone might be revoked. spicy. π₯unsigned int * criticalβ will be non-zero if the extension is marked as critical (may be null). may be null! so if you don't care, you can just passNULLand move on with your day. lowkey convenient.
π DESCRIPTION π
so what does this actually DO? this function retrieves the CRL distribution points (2.5.29.31), contained in the given certificate in the X509v3 Certificate Extensions.
translating: certificates can carry a lil list of "hey, if you wanna check whether I've been revoked, go look here" URLs/addresses. this function pulls those out of the X509v3 Certificate Extensions for you. the OID is 2.5.29.31, in case you needed to know her government name. π
β RETURNS β
okay so this is the part where you gotta pay attention, because there's a gotcha:
GNUTLS_E_SHORT_MEMORY_BUFFERand updatesret_sizeifret_sizeis not enough to hold the distribution point. your buffer was too small, babe. she's telling you the size you actually need viaret_size, so you can come back with a bigger one. it's giving "let me speak to the manager" but like, in a helpful way.- otherwise, the type of the distribution point if everything was ok. the type is one of the enumerated
gnutls_x509_subject_alt_name_t. β¨ - and if the certificate does not have an Alternative name with the specified sequence number, then
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEis returned. so basically "she's not here, girl." π
ngl, that GNUTLS_E_SHORT_MEMORY_BUFFER β resize β retry loop is the standard pattern here. you're not doing it wrong, that's just how she works. π«Ά
π REPORTING BUGS π
found a bug? first of all, relatable. second of all, 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. so like, take her, share her, 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/
go read the rest of the lore, iykyk. πβ¨
and that's the whole page, bestie. this one's from gnutls 3.8.13, page gnutls_x509_cr...crl_dist_points(3), dated with the 3.8.13 era energy. 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