gnutls_pkcs11_copy_secret_key(3)
π gnutls_pkcs11_copy_secret_key β bestie edition π
okay so this page lives in the gnutls manual, and it's all about gnutls_pkcs11_copy_secret_key. let's get into it π«Ά
β¨ NAME β¨
gnutls_pkcs11_copy_secret_key β it's an API function, bestie. that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_copy_secret_key(const char * token_url, gnutls_datum_t
* key, const char * label, unsigned int key_usage, unsigned int flags);
like. look at that signature. iconic. no cap β¨
π ARGUMENTS π
const char * token_urlβ a PKCS 11 URL specifying a token. it's the little address that tells you which token we're talking about πΊοΈgnutls_datum_t * keyβ the raw key. just. the key. the actual key itself, sitting right there πΈconst char * labelβ a name to be used for the stored data. so future-you can find it, periodt π·οΈunsigned int key_usageβ one ofGNUTLS_KEY_*. pick your fighter πunsigned int flagsβ one ofGNUTLS_PKCS11_OBJ_FLAG_*. more knobs, more options, we love that for you ποΈ
π¦ DESCRIPTION π¦
okay so the way this works: this function will copy a raw secret (symmetric) key into a PKCS 11 token specified by a URL. that's it. that's the job. π§
and the key can be marked as sensitive or not β so you get to decide whether it's giving secretive main character energy or open-book energy πβ¨
π RETURNS π
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so like, 0 = slay, negative = not slay π
β SINCE β
2.12.0 β this one's been around a minute, a true elder icon π
π REPORTING BUGS π
found a bug? don't just suffer in silence, tell the people:
- 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.
π₯ 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 the whole page, bestie!! go forth and copy those secret keys, but like, responsibly π
this was gnutls version 3.8.13 doing its thing. 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