GNUTLS_X509_CRL_GET_EXTENSION_INFO(3)

πŸ’– gnutls_x509_crl_get_extension_info πŸ’–

okay bestie, so this is a page from the gnutls manual β€” like, the gnutls_x509_crl..._extension_info(3) one β€” and it's lowkey one of the cutest little lookup functions in the whole x509 toolkit. it's an API function. that's the whole name section. slay. πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crl_get_extension_info(gnutls_x509_crl_t crl, unsigned
indx, void * oid, size_t * sizeof_oid, unsigned int * critical);

yes that's the whole vibe. one header, one function, five args. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crl_t crl β€” this is the one that should contain a gnutls_x509_crl_t type. like, it has to. that's its whole job. πŸ’–
  • unsigned indx β€” tells the function which extension OID you wanna send. use (0) to grab the very first one, bestie. zero-indexed, as the universe intended. ✨
  • void * oid β€” a pointer where the OID gets stored. the lil delivery address. πŸŽ€
  • size_t * sizeof_oid β€” this one's a two-faced icon: initially it holds the maximum size of oid, and on return it holds the actual size of oid. character development fr. 🌸
  • unsigned int * critical β€” output variable that carries the critical flag. may be NULL, no pressure. 🫢

🌈 DESCRIPTION 🌈

so what does this diva do? it returns the requested extension OID in the CRL, plus the critical flag for it. the extension OID gets stored as a string in the buffer you hand it. ✨

wanna get the actual data behind that OID? that's not this function's business. use gnutls_x509_crl_get_extension_data() for that. iykyk. πŸ’…

and now the important part, so listen up: if the buffer you provided is not long enough to hold the output, then * sizeof_oid gets updated and GNUTLS_E_SHORT_MEMORY_BUFFER will be returned. so it's not being rude, it's telling you exactly how much room it needs. iconic behavior honestly. 😭


πŸ‘‘ RETURNS πŸ‘‘

on success, GNUTLS_E_SUCCESS (0) is returned. πŸ’– otherwise you get a negative error code in case of an error.

and if you've reached the last extension available, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. that's it, that's the end of the list, no more extensions, go home. πŸ’€


⭐ SINCE ⭐

2.8.0 β€” an elder. been here since way back. respect. 🧚


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? spill the tea to <bugs@gnutls.org>.

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. so like, go off, but keep the receipts. periodt. πŸŽ€


🌸 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 3.8.13, the gnutls_x509_crl..._extension_info(3) page, brought to you by the Free Software Foundation and everyone else who touched it. go read your CRLs, stay hydrated, mwah πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from