GNUTLS_X509_CRQ_GET_ATTRIBUTE_DATA(3)
π gnutls_x509_crq_get_attribute_data β bestie's guide to pulling attribute data out of a cert request π
okay so this one lives in the gnutls manual, and if you're reading this you're probably deep in certificate request (CRQ) land and need to grab an attribute's data. no worries, I got you π«Ά
β¨ NAME β¨
gnutls_x509_crq_get_attribute_data β literally just an API function, that's the whole vibe
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crq_get_attribute_data(gnutls_x509_crq_t crq, unsigned
indx, void * data, size_t * sizeof_data);
π ARGUMENTS π
gnutls_x509_crq_t crqβ this should contain agnutls_x509_crq_ttype. like, that's what it's for, bestie.unsigned indxβ tells you which attribute number you want. use(0)to get the very first one. zero-indexed, iconic behavior πvoid * dataβ a pointer to a structure that's gonna hold the data (may be null, so like, it's allowed to be a little nothing)size_t * sizeof_dataβ at the start, this holds the size ofoid
π DESCRIPTION π
so this function returns the requested attribute data inside the certificate request. the attribute data gets stored as a string in the buffer you handed over. slay.
quick note though β use gnutls_x509_crq_get_attribute_info() to extract the OID. and if you'd rather get your data indexed by the attribute OID instead of by sequence, use gnutls_x509_crq_get_attribute_by_oid() instead. pick your fighter, both are valid π
β RETURNS β
on success you get GNUTLS_E_SUCCESS (0) back, and otherwise a negative error code if something went wrong. π
and if you've reached the last extension available, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. that's not a bug, that's just the end of the line, bestie.
π¦ SINCE π¦
2.8.0 β old money, she's been here a minute π
π 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. (yes really, go off, 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/
no cap: every flag, every argument, every error code stayed exactly where it was. the vibes are new, the facts are untouched. periodt. π
okay bye bestie, this was gnutls version 3.8.13 from the gnutls manual β go read your attributes, you absolute 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