gnutls_pkcs11_copy_x509_crt2(3)
β¨ gnutls_pkcs11_copy_x509_crt2 β NAME β¨
okay so bestie π this is gnutls_pkcs11_copy_x509_crt2, an API function living in the gnutls manual (section 3, the library-functions girlies). It's the one that copies a cert into a PKCS 11 token, and yes she serves. π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_copy_x509_crt2(const char * token_url,
gnutls_x509_crt_t crt, const char * label, const gnutls_datum_t * cid,
unsigned int flags);
that signature is copy-pasted exactly, no cap, don't let anyone tell you otherwise π
π«Ά ARGUMENTS π«Ά
const char * token_urlβ a PKCS 11 URL that specifies a token. that's the where, bestie. πgnutls_x509_crt_t crtβ the certificate you're copying. the whole point of the mission. πconst char * labelβ the name to be used for the stored data. this is what you're calling it. name her, she deserves it. β¨const gnutls_datum_t * cidβ theCKA_IDto set for the object-if NULL, the ID will be derived from the public key. so like, hand it an ID or hand it nothing and it'll do the math itself, main character energy fr fr π₯unsigned int flagsβ one ofGNUTLS_PKCS11_OBJ_FLAG_*. pick your flag, girlie. π©
π DESCRIPTION π
This function will copy a certificate into a PKCS 11 token specified by a URL. periodt.
Valid flags to mark the certificate:
GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTEDGNUTLS_PKCS11_OBJ_FLAG_MARK_PRIVATEGNUTLS_PKCS11_OBJ_FLAG_MARK_CAGNUTLS_PKCS11_OBJ_FLAG_MARK_ALWAYS_AUTH
those are the four, no more no less, that's the vibe check and she passed. π―
π¦ RETURNS π¦
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value.
so 0 means slay, negative means we're crying in the group chat π
β SINCE β
3.4.0 β she's been iconic since day one, lowkey a legend. π
π REPORTING BUGS π
Report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org
if something's broken, tell the maintainers, not me, I'm just the messenger bestie π«Ά
π 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.
like, free to share, just keep the receipts, that's the rule. π
π 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/
go read it, iykyk πβ¨
and that's the whole page bestie π written for the gnutls manual, version 3.8.13, page gnutls_pkcs11_copy_x509_crt2(3) β go forth and copy those certs, you absolute icon πππ¦
π¦ 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