gnutls_pkcs11_privkey_generate(3)
π gnutls_pkcs11_privkey_generate(3) π
okay so bestie, welcome to the gnutls manual β this one's from the gnutls gang, and today's main character is gnutls_pkcs11_privkey_generate. she's an API function. she makes keys. inside tokens. she does NOT let them leave. we love a homebody queen π
β¨ NAME β¨
gnutls_pkcs11_privkey_generate β literally just an API function, that's the whole name, no notes π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_privkey_generate(const char * url,
gnutls_pk_algorithm_t pk, unsigned int bits, const char * label,
unsigned int flags);
like. look at her. five arguments. she's doing the most and honestly? slay.
π ARGUMENTS π
const char * urlβ the token URL, aka the address of the little token house where the key is gonna live πgnutls_pk_algorithm_t pkβ the public key algorithm, so she knows what flavour of crypto we're serving todayunsigned int bitsβ the security bits, aka how beefy we're going π₯const char * labelβ a label. just a lil name tag so you can find her later π·οΈunsigned int flagsβ should be zero. that's it. zero. nothing else. don't be spicy with this one π
π DESCRIPTION π
so here's the tea: this function generates a private key in the token that you specified with url.
and the iconic part β the key gets generated within the token and it is not exportable. she stays in the house. forever. no cap, you cannot take her out. that's the whole point of the vibe. πβ¨
β RETURNS β
if everything goes right, you get GNUTLS_E_SUCCESS (which is 0, the good number, the green flag π’).
otherwise? a negative error value. so if it's negative, something went sideways, and you should go look at that π
π¦ SINCE π¦
3.0 β she's been around, she's a veteran, she's got seniority π
π REPORTING BUGS π
found a bug? do NOT gatekeep, 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: share the love, 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, go visit:
https://www.gnutls.org/manual/
and that's the whole page bestie, no crumbs left, every flag and path accounted for π§
this has been gnutls version 3.8.13 bringing you gnutls_pkcs11_privkey_generate (3) β stay encrypted, stay unbothered, and may all your return values be 0 πΈππ
π¦ 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