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 agnutls_x509_crq_ttype. 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 beNULL. yes, optional, we love a flexible icon.size_t * sizeof_oidβ initially holds the size ofoid. keyword initially, because this thing updates. keep reading, it gets juicier.unsigned int * criticalβ an output variable carrying the critical flag. may beNULL. 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_BUFFERif the buffer you gave it is not long enough π β and in that case* sizeof_oidwill be updated with the required size, so like, it's telling you exactly how much room it needs. honestly? thoughtful.- On success,
0is 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 π
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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms