gnutls_x509_crl_iter_crt_serial(3)
π gnutls_x509_crl_iter_crt_serial β the gnutls manual, bestie edition π
okay so you're in the gnutls manual (that's the GNU TLS library, she's iconic, she's been holding down the fort since forever) and you clicked on this page, which means you wanna talk about CRL serial numbers and iterating over them like a main character. let's go. β¨
πΈ NAME πΈ
gnutls_x509_crl_iter_crt_serial β API function
no cap, that's literally the whole name. it's a function. it does a thing. we'll get there. π
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_crl_iter_crt_serial(gnutls_x509_crl_t crl,
gnutls_x509_crl_iter_t * iter, unsigned char * serial, size_t *
serial_size, time_t * t);
π ARGUMENTS π
gnutls_x509_crl_t crlβ should contain agnutls_x509_crl_ttype. yeah bestie, the parameter is the type, we know, we know. it's the CRL you're reading from. πgnutls_x509_crl_iter_t * iterβ a pointer to an iterator. initially the iterator should beNULLβ like, before your first call? leave itNULL, she'll handle herself from there. the iterator is the little bookmark that remembers where you are between calls. π«Άunsigned char * serialβ where the serial number will be copied. this is the output spot, the lil envelope the serial gets dropped into. πsize_t * serial_sizeβ initially holds the size ofserial. so you tell it how much room you've got, and it uses that. πtime_t * tβ if non null, will hold the time this certificate was revoked. optional! passNULLif you don't care, no judgement. β°
β¨ DESCRIPTION β¨
so this function does the exact same thing as gnutls_x509_crl_get_crt_serial(), but plot twist: it reads sequentially and keeps state in the iterator between calls. it's giving "I remember where we left off." π§ β¨
the way that this matters: it gives you better performance in sequences with many elements (50000+). so if you've got a CRL with fifty thousand entries and you're looping through them one by one, this is the move. periodt. π₯
when you go past the last element and try to access it, you get GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE back, and the iterator gets reset. so it doesn't just leave you hanging, it politely closes the book and puts the bookmark back at the start. π so thoughtful.
after use, the iterator must be deinitialized using gnutls_x509_crl_iter_deinit(). bestie do NOT forget this one, it's not optional, it's the cleanup step, it's washing your face before bed. π§Ό
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, which is your cue to go check what went wrong. no vibe, only bug. π
π REPORTING BUGS π
found something cursed? 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. (yes, she's free, she's generous, she's a giver. π)
π 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, you ate it, you understood the assignment. this was gnutls 3.8.13, gnutls_x509_crl_iter_crt_serial(3) β mwah, take care of your iterators, deinit them, hydrate, and I'll see you in the next manpage. ππβ¨π¦πΈ
π¦ 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