GNUTLS_X509_EXT_EXPORT_CRL_DIST_POINTS(3)

πŸ’– gnutls_x509_ext_export_crl_dist_points β€” bestie edition πŸ’–

okay so this is a page from the gnutls manual, and today's main character is gnutls_x509_ext_export_crl_dist_points(3). it's giving "I turn your CRL distribution points into raw bytes" and honestly? iconic. let's get into it πŸŽ€


✨ NAME ✨

gnutls_x509_ext_export_crl_dist_points β€” an API function, no cap. that's the whole name, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_export_crl_dist_points(gnutls_x509_crl_dist_points_t
                                           cdp, gnutls_datum_t * ext);

like yes bestie, one include and one function call and you're literally in business ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crl_dist_points_t cdp β€” a pointer to an initialized CRL distribution points. key word: initialized. don't be handing me a random uninitialized struct, i'm begging πŸ™ˆ
  • gnutls_datum_t * ext β€” the DER-encoded extension data. and listen, this one comes with a chore attached: it must be freed using gnutls_free(). yes, must. not "should", not "whenever", MUST. the way that memory will just leak if you don't... πŸ’€

πŸŽ€ DESCRIPTION πŸŽ€

so what does this actually do? it converts the provided policies into a certificate policy DER encoded extension, and that extension's OID is 2.5.29.31. that's the magic number, that's the assignment, periodt πŸ”₯

also, quick heads up: the ext data gets allocated using gnutls_malloc(). so it's gnutls's memory, and it wants to be freed gnutls's way. matching sets only, bestie 🫢


⭐ RETURNS ⭐

  • on success you get GNUTLS_E_SUCCESS (0) β€” slay, we love a zero πŸ’–
  • otherwise you get a negative error value β€” not slay, go read it and figure out what happened 😭

🌈 SINCE 🌈

3.3.0 β€” this has been around since 3.3.0, so it's been serving looks for a minute. veteran behaviour πŸ‘‘


🧚 REPORTING BUGS 🧚

found a bug? spill it, don't sit on it:

we don't gatekeep problems here πŸ’œ


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

and the license, verbatim because we respect the paperwork: 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. no royalty, no drama, just vibes ✨


πŸ“ 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/

like genuinely go look, it's right there πŸ¦‹


lowkey important reminder: free that ext with gnutls_free(). i will know. the memory allocator will know. πŸ™ˆ

okay that's the whole page bestie, you ate it, you understood it, you're basically a PKI girlie now πŸ’…

this was gnutls 3.8.13, from the gnutls manual β€” gnutls_x509_ext...crl_dist_points(3). mwah, bye πŸŽ€πŸ’–

πŸ“¦ where this page comes from