gnutls_pkcs11_...ached_extension(3)
β¨ gnutls_pkcs11_copy_attached_extension β¨
okay bestie, so this one lives in the gnutls manual, section 3, and it's literally called gnutls_pkcs11_copy_attached_extension β yes the whole vibe is "copy an attached extension into a PKCS 11 token" and honestly? iconic. π
πΈ NAME πΈ
gnutls_pkcs11_copy_attached_extension β it's an API function, no cap π
π¦ SYNOPSIS π¦
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_copy_attached_extension(const char * token_url,
gnutls_x509_crt_t crt, gnutls_datum_t * data, const char * label,
unsigned int flags);
π ARGUMENTS π
const char * token_urlβ a PKCS 11 URL that specifies a token. it's giving "where are we putting this" energy β¨gnutls_x509_crt_t crtβ an X.509 certificate object πgnutls_datum_t * dataβ the attached extension, right there in your handsconst char * labelβ a name to be used for the attached extension, and lowkey it may beNULLπ«Άunsigned int flagsβ one ofGNUTLS_PKCS11_OBJ_FLAG_*(pick from that family, bestie)
π DESCRIPTION π
so this function will copy the attached extension sitting in data for the certificate you passed in crt, and it drops it into the PKCS 11 token specified by the URL β and yes, typically a trust module π
the extension has to be in RFC5280 Extension format, periodt. no other format, no exceptions. π
β RETURNS β
on success you get GNUTLS_E_SUCCESS (0) back π₯³ β otherwise it returns a negative error value, which is the universe saying "not today" π
π§ SINCE π§
3.3.8 β a whole era π
π REPORTING BUGS π
spotted a bug? don't be shy, tell the devs:
- 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. (basically: be nice, 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/
ok bestie that's the whole thing, every flag, every argument, every caveat β nothing skipped, nothing invented, just vibes and accuracy π
gnutls version 3.8.13, and this page is dated with the same release β mwah, love that for us πβ¨π¦
π¦ 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