GNUTLS_X509_CRQ_GET_EXTENSION_BY_OID(3)
β¨ gnutls_x509_crq_get_extension_by_oid(3) β¨
okay bestie, welcome to the gnutls corner of the manual, section 3 π this one lives in the gnutls manual and it's genuinely so useful, i promise.
πΈ NAME πΈ
gnutls_x509_crq_get_extension_by_oid β it's an API function, no cap π
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_crq_get_extension_by_oid(gnutls_x509_crq_t crq, const
char * oid, unsigned indx, void * buf,
size_t * buf_size, unsigned int *
critical);
like. look at her. six arguments. main character energy fr fr π
π ARGUMENTS π
gnutls_x509_crq_t crqβ should contain agnutls_x509_crq_ttype. that's the certificate request you're digging through π«Άconst char * oidβ holds an Object Identifier in a null terminated string. yes it has to be null terminated, don't play with her πunsigned indxβ in case multiple same OIDs exist in the extensions, this specifies which to get. use(0)to get the first one. so if you've got a lil collection of the same OID, this is your picker β¨void * bufβ a pointer to a structure to hold the name (may be null). may be null!! she's flexible πsize_t * buf_sizeβ initially holds the size ofbufunsigned int * criticalβ will be non-zero if the extension is marked as critical. so if this comes back with something in it, that extension is critical, pay attention bestie π
π DESCRIPTION π
this function will return the extension specified by the OID in the certificate. the extensions will be returned as binary data DER encoded</>, in the provided buffer.
that's it. that's the whole vibe. you give her an OID, she hands you back DER-encoded binary bytes in your buffer π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise a negative error code in case of an error.
and if the certificate does not contain the specified extension, you get GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE β which is basically gnutls gently saying "girl, that's not in here" π not a crash, just a negative number.
π SINCE π
2.8.0 β she's been around a minute, an icon, a legend π
π§ REPORTING BUGS π§
found something cursed? 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. slay, that's the license, keep the notice π«Ά
π¦ 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 bestie, every flag, every error code, every copyright line, all of it π now go read your certificate requests β¨
gnutls version 3.8.13 β mwah, love u, bye πππΈ
π¦ 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