gnutls_pkcs7_get_attr(3)
π gnutls_pkcs7_get_attr(3) β the gnutls manual, bestie edition π
okay so we're diving into the gnutls manual and this specific page is all about gnutls_pkcs7_get_attr, an API function. sit down, grab a boba, we're getting a PKCS 7 attribute out of a list and it's gonna be β¨flawlessβ¨
πΈ NAME πΈ
gnutls_pkcs7_get_attr β literally just an API function, that's the whole name, no notes π
β¨ SYNOPSIS β¨
#include <gnutls/pkcs7.h>
int gnutls_pkcs7_get_attr(gnutls_pkcs7_attrs_t list, unsigned idx, char
** oid, gnutls_datum_t * data, unsigned flags);
like, copy that exactly bestie, don't freestyle it π«Ά
π ARGUMENTS π
gnutls_pkcs7_attrs_t listβ a list of existing attributes, orNULLif you want the very first one. starting fresh, main character energy πunsigned idxβ the index of the attribute you're trying to get. which one? that one. π―char ** oidβ the OID of the attribute. and it's read-only, so don't even think about touching it πgnutls_datum_t * dataβ the raw data of the attribute. raw. unfiltered. πunsigned flagsβ zero, orGNUTLS_PKCS7_ATTR_ENCODE_OCTET_STRING. those are the options, that's it, periodt π
π¦ DESCRIPTION π¦
so what does this do? it will get a PKCS 7 attribute from the provided list. simple. iconic. obsessed.
here's the tea though: the OID is a constant string, but data will be allocated and it must be deinitialized by the caller. not me reminding you to clean up after yourself π free your data, bestie, it's the right thing to do.
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned β slay! π
otherwise you get a negative error value, which is giving less slay but still informative.
and specifically: GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned if there are no data in the current index. empty. void. nothing there. π
π SINCE π
3.4.2 β she's been around, she's a veteran, respect her π
π«Ά REPORTING BUGS π«Ά
found a bug? don't suffer in silence, tell the girlies:
- 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, go off, share it, 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/
lowkey the whole vibe here is: grab the attribute, check your return value, free your data, and move on with your life. no cap. π₯
and that's the page, bestie!! this was gnutls_pkcs7_get_attr(3) from gnutls version 3.8.13 β she ate, she left no crumbs, 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