gnutls_x509_ex...rt_key_purposes(3)

πŸ’– gnutls_x509_ext_export_key_purposes πŸ’–

okay bestie, welcome to the gnutls manual page for gnutls_x509_ext_export_key_purposes β€” yes that name is a whole mouthful, and yes the title bar up top is getting cut off as gnutls_x509_ex...rt_key_purposes(3) because even the terminal can't handle the full lewk. anyway. it's a real function, it's an API function, and it's lowkey iconic. let's get into it ✨


πŸŽ€ NAME πŸŽ€

gnutls_x509_ext_export_key_purposes β€” it's an API function, periodt.


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_export_key_purposes(gnutls_x509_key_purposes_t p,
                                       gnutls_datum_t * ext);

like, that's the whole vibe right there πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_key_purposes_t p β€” this is the key purposes. the source material, the main character, the moment. 🫢
  • gnutls_datum_t * ext β€” this is the DER-encoded extension data that comes out the other side. and listen, bestie, you must free it using gnutls_free(). not free, not delete, gnutls_free(). iykyk. 🚨

✨ DESCRIPTION ✨

so what does this thing actually do? it takes your key purposes type and converts it into a DER-encoded PKIX ExtKeyUsageSyntax extension β€” that's OID 2.5.29.37 for the girlies taking notes πŸ“βœ¨.

and the output data that lands in ext? it's allocated using gnutls_malloc(). so like, it's yours now, you own it, you're responsible for it. treat it with care πŸ’–


πŸ“ RETURNS πŸ“

On success, you get GNUTLS_E_SUCCESS (0) back β€” the good ending, the slay ending 🌈.

Otherwise? a negative error value. the not-so-slaying ending 😭 but hey, at least you know.


🧚 SINCE 🧚

3.3.0 β€” vintage. retro. a classic. it's been serving since way back πŸ’œ


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't just suffer in silence, bestie. report it to <bugs@gnutls.org> πŸ“§

Home page, for when you need the full lore: 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. like, go off, redistribute responsibly πŸŽ€


πŸ”₯ 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/

ngl if you skipped down here you missed stuff, go back up πŸ”™ but also. mwah. you did great.

and that's the whole page, bestie!! this was gnutls version 3.8.13, page gnutls_x509_ex...rt_key_purposes(3), and honestly? she ate. bye bye, stay DER-encoded, stay free'd properly, and don't forget gnutls_free() πŸ’…πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from