GNUTLS_X509_CRQ_GET_EXTENSION_INFO(3)
π gnutls_x509_crq_get_extension_info(3)
okay bestie, so this one lives in the gnutls manual, section 3, and it's literally all about peeking at extensions inside a certificate request. the way this function just... reads OIDs for you. iconic behaviour, no cap. π
β¨ NAME β¨
gnutls_x509_crq_get_extension_info β it's an API function, and it's here to hand you the OID of an extension in a CRQ. periodt.
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crq_get_extension_info(gnutls_x509_crq_t crq, unsigned
indx, void * oid, size_t * sizeof_oid, unsigned int * critical);
π¦ ARGUMENTS π¦
gnutls_x509_crq_t crqβ this should contain agnutls_x509_crq_ttype. like, that's the whole vibe. π«Άunsigned indxβ tells us which extension number we want. use(0)to grab the very first one, bestie.void * oidβ a pointer, and it's where we store the OID. slay.size_t * sizeof_oidβ on the way in, it holds the maximum size ofoid; on the way back out, it holds the actual size ofoid. she's got range. πunsigned int * criticalβ output variable holding the critical flag. may beNULL, no pressure.
π DESCRIPTION π
so this function returns the requested extension OID that's chillin' inside the certificate, plus the critical flag for it. the extension OID gets stored as a string in the buffer you provided. and if you wanna go get the actual data? use gnutls_x509_crq_get_extension_data() to extract it. iykyk. π₯
and listen β if the buffer you handed over is not long enough to hold the output, then * sizeof_oid gets updated and GNUTLS_E_SHORT_MEMORY_BUFFER will be returned. so like, don't skimp on the buffer, okay? π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error code in case of an error. and if you've reached the last extension available, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. that's just the end of the list, babe, not a personal attack. π
π SINCE π
2.8.0 β she's been here since 2.8.0, a true elder icon. π
π 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. so like, keep the receipts, bestie. π§
π 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/
gnutls 3.8.13 β and that's the whole page, fr fr. go forth and read those extension OIDs, main character. π¦β¨π
π¦ 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