GNUTLS_X509_CRT_GET_EXTENSION_DATA(3)
β¨ NAME β¨
gnutls_x509_crt_get_extension_data β bestie it's an API function π (from the gnutls manual, x509 section, iykyk)
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_crt_get_extension_data(gnutls_x509_crt_t cert, unsigned
indx, void * data, size_t * sizeof_data);
πΈ ARGUMENTS πΈ
gnutls_x509_crt_t certβ should contain agnutls_x509_crt_ttype, like that's literally its whole job πunsigned indxβ tells us which extension OID to send. Use(0)to get the first one, okay? start from the top bestie π«Άvoid * dataβ a pointer to a structure to hold the data (and yes, it may be null, no stress π)size_t * sizeof_dataβ initially holds the size ofdata. it's giving "you tell me how big, I'll tell you how much" energy β¨
π DESCRIPTION π
okay so, this function will return the requested extension data in the certificate. the extension data gets stored in the provided buffer, periodt. π
Use gnutls_x509_crt_get_extension_info() to extract the OID and critical flag. and use gnutls_x509_crt_get_extension_by_oid() instead if you want to get data indexed by the extension OID rather than sequence β like, different vibe check, different function, pick your fighter π₯
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned. otherwise a negative error code is returned π. And if you have reached the last extension available, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned β so if you see that, congrats bestie, you ran out, there's no more π
π REPORTING BUGS π
Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org
not me telling you to actually email the bugs, but like, fr fr, they want to know π
π 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.
iconic behaviour honestly, no royalty, just vibes π
π 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/
that's the whole page bestie, slay π
β¨ β this was gnutls version 3.8.13, from the gnutls_x509_crt..._extension_data(3) page, mwah, go read the Texinfo manual if you want more ππ¦π
π¦ 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