gnutls_privkey_export_pkcs11(3)
β¨ gnutls_privkey_export_pkcs11 β¨
okay bestie, welcome to the gnutls manual, section 3 π this one's called gnutls_privkey_export_pkcs11 and it's literally the glow-up spell that turns your abstract private key into a PKCS#11 one π
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_privkey_export_pkcs11(gnutls_privkey_t pkey,
gnutls_pkcs11_privkey_t * key);
like. that's it. that's the whole vibe π¦
π ARGUMENTS π
gnutls_privkey_t pkeyβ the private key itself, the main character πgnutls_pkcs11_privkey_t * keyβ the spot where the exported key gets dropped off, aka the location for the key to be exported π
π« DESCRIPTION π«
so basically this function converts the abstract private key you hand it into a gnutls_pkcs11_privkey_t type β¨
important bestie: the key must be of type GNUTLS_PRIVKEY_PKCS11. no cap. if it isn't, this whole thing is not gonna slay for you π
and the key that comes back in key? you must deinitialize it with gnutls_pkcs11_privkey_deinit(). it's giving "you broke it, you clean it up" π§Ή don't just leave it there, that's so not the move π
π«Ά RETURNS π«Ά
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise you get a negative error value, which is the code equivalent of "it's not you, it's the parameters" π
π SINCE π
3.4.0 β she's been iconic since day one, fr fr β
π¦ REPORTING BUGS π¦
found a bug? tell the girlies at 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, you can share it, 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/
and that's a wrap, babe π this was gnutls_privkey_export_pkcs11 from the gnutls 3.8.13 era, page 3 of the manual, and honestly? she ate π
go forth and deinit your keys, ily π«Άβ¨
π¦ 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