gnutls_x509_cr...key_purpose_oid(3)

πŸ’– gnutls_x509_crq_get_key_purpose_oid β€” the API function

okay bestie, so you're deep in the gnutls manual (yes, that's the manual name, we're being ✨formal✨ today) and you found this little cutie of a function. It lives in the Extended Key Usage department and it's about to tell you what a certificate request actually wants to be used for. main character energy fr fr.


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crq_get_key_purpose_oid(gnutls_x509_crq_t crq, unsigned
indx, void * oid, size_t * sizeof_oid, unsigned int * critical);

like, just drop that #include <gnutls/x509.h> at the top of your file and you're so back 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crq_t crq β€” bestie this one should contain a gnutls_x509_crq_t type. that's literally it, that's the vibe check it has to pass.
  • unsigned indx β€” which OID do you want?? use (0) to get the very first one. the first one. the head of the lineup. the one who ate. πŸ‘‘
  • void * oid β€” a pointer where the OID gets stored. and guess what β€” it may be NULL. yes, optional, we love a flexible icon.
  • size_t * sizeof_oid β€” initially holds the size of oid. keyword initially, because this thing updates. keep reading, it gets juicier.
  • unsigned int * critical β€” an output variable carrying the critical flag. may be NULL. no pressure, no drama. πŸ¦‹

🌸 DESCRIPTION 🌸

so this function will extract the key purpose OIDs of the Certificate specified by the given index. these are stored in the Extended Key Usage extension (2.5.29.37). not to be dramatic but that's THE extension.

and if you want human readable names for all of these, go look at the GNUTLS_KP_* definitions. iykyk πŸ’…


⭐ RETURNS ⭐

  • GNUTLS_E_SHORT_MEMORY_BUFFER if the buffer you gave it is not long enough 😭 β€” and in that case * sizeof_oid will be updated with the required size, so like, it's telling you exactly how much room it needs. honestly? thoughtful.
  • On success, 0 is returned. slay. ✨

πŸ•°οΈ SINCE πŸ•°οΈ

2.8.0 β€” an elder. a legend. been here since way back.


πŸ› REPORTING BUGS πŸ›

found a bug? not the cute kind?? report it to <bugs@gnutls.org> fr fr.

Home page: https://www.gnutls.org β€” go say hi 🌈


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 bestie, you can share it, just keep the receipts πŸ’–)


πŸ‘€ 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/

ok that's the whole page, no notes, you ate πŸ’…

and that's a wrap on gnutls 3.8.13, page gnutls_x509_cr...key_purpose_oid(3) β€” go forth and read those OIDs, bestie πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from