gnutls_x509_crl_get_crt_serial(3)

πŸ’– gnutls_x509_crl_get_crt_serial(3) πŸ’–

okay bestie, welcome to the gnutls manual, and today's main character is gnutls_x509_crl_get_crt_serial. it's giving "let me pull one specific revoked cert's serial number out of this CRL" energy, and honestly? we're obsessed. πŸŽ€


✨ NAME ✨

gnutls_x509_crl_get_crt_serial β€” API function 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509.h>

int gnutls_x509_crl_get_crt_serial(gnutls_x509_crl_t crl, unsigned indx,
unsigned char * serial, size_t * serial_size, time_t * t);

πŸ’… ARGUMENTS πŸ’…

  • gnutls_x509_crl_t crl β€” this one should contain a gnutls_x509_crl_t type. it's the CRL we're snooping in, no cap. πŸ”₯
  • unsigned indx β€” the index of the certificate to extract, and yes babe, it starts from 0. zero-indexed girlies rise. ✨
  • unsigned char * serial β€” where the serial number will be copied. this is the lil landing pad for the goods. 🫢
  • size_t * serial_size β€” initially holds the size of serial. so you tell it how much room you got, it tells you what's up. πŸ‘‘
  • time_t * t β€” if non null, will hold the time this certificate was revoked. literally the "when did this go down" timestamp. 😭

🌈 DESCRIPTION 🌈

so what does this do? this function will retrieve the serial number of the specified, by the index, revoked certificate. that's it. that's the whole vibe. you give it an index, it hands you the serial of the revoked cert sitting at that spot in the CRL. πŸ’–

lowkey important warning bestie: note that this function will have performance issues in large sequences of revoked certificates. in that case use gnutls_x509_crl_iter_crt_serial(). like, if your CRL is a whole saga, don't do this. use the iterator. periodt. πŸ’€

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so 0 = slay, negative = not slay, and you go check that error code. 🌸


πŸŽ€ REPORTING BUGS πŸŽ€

found a bug? don't be shy, report it:


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. (iconic, generous, no strings attached. we love to see it. 🧚)


πŸ”₯ 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 the gnutls_x509_crl_get_crt_serial(3) manual from gnutls version 3.8.13 β€” go forth, read your CRLs, and remember: if the list is huge, use the iterator. mwah. πŸ’…πŸ’–βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from