gnutls_x509_cr...tension_by_oid2(3)
β¨ gnutls_x509_crq_get_extension_by_oid2 β¨
okay bestie, welcome to the gnutls manual, and specifically to this lil corner of it. this page is literally about one function and it's a whole vibe π
πΈ NAME πΈ
gnutls_x509_crq_get_extension_by_oid2 β it's an API function, no cap π«Ά
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_crq_get_extension_by_oid2(gnutls_x509_crq_t crq, const
char * oid, unsigned indx, gnutls_datum_t * output, unsigned int *
critical);
π ARGUMENTS π
gnutls_x509_crq_t crqβ bestie, this is supposed to hold agnutls_x509_crq_ttype. that's the whole assignment. πconst char * oidβ holds an Object Identifier as a null terminated string. yes, a string. yes, terminated with a null. iconic behavior fr.unsigned indxβ so when multiple extensions with the same OID are hanging out in there, this tells the function which one you want. use(0)to grab the first one. zero-indexed, we love to see it β¨gnutls_datum_t * outputβ this bad boy will hold the allocated extension data. allocated!! so like, it's yours now, handle it. πunsigned int * criticalβ will be non-zero if the extension is marked as critical. that's it, that's the whole job. π¦
π DESCRIPTION π
so the way that this works: this function will return the extension specified by the OID in the certificate. π―
and the extensions get returned as binary data, DER encoded, in the buffer you provided. DER encoded!! like, raw bytes, not a cute lil string. don't @ me about it, that's just the deal. π
β RETURNS β
- on success,
GNUTLS_E_SUCCESS(0) is returned. slay. π - otherwise you get a negative error code, because something went wrong. π
- and if the certificate does not contain the extension you asked for? you get
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE. it's giving "not found bestie, sorry". π
π§ SINCE π§
3.3.8 β been here since 3.3.8, an OG fr fr. π
π₯ REPORTING BUGS π₯
found a bug? don't suffer in silence, tell the people:
- Report bugs to <bugs@gnutls.org>. π§
- Home page: https://www.gnutls.org
π 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 that's the exact deal, it's very generous of them, we stan π«Ά)
π¦ 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 bestie, that's the whole page. go forth and read your extensions. π β¨
and that's a wrap!! this was gnutls 3.8.13, the gnutls_x509_cr...tension_by_oid2(3) page, brought to you with love from the gnutls manual. mwah π π
π¦ 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