gnutls_pkcs11_copy_pubkey(3)
π gnutls_pkcs11_copy_pubkey(3) π
okay bestie, welcome to the gnutls manual, this one's gnutls_pkcs11_copy_pubkey and it's literally the "put my public key on a token" button. let's get into it π«Ά
β¨ NAME β¨
gnutls_pkcs11_copy_pubkey β an API function, and yes she's serving exactly what the name says π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_copy_pubkey(const char * token_url, gnutls_pubkey_t
pubkey, const char * label, const gnutls_datum_t * cid, unsigned int
key_usage, unsigned int flags);
there she is. six arguments. no cap. π
π ARGUMENTS π
const char * token_urlβ a PKCS 11 URL that specifies a token. like, which token are we talking to, bestie? πgnutls_pubkey_t pubkeyβ the public key you wanna copy. the main character of this whole function tbh πconst char * labelβ the name that's gonna be used for the stored data. her government name β¨const gnutls_datum_t * cidβ theCKA_IDto set for the object -if NULL, the ID will be derived from the public key. so either you hand it over or it just figures itself out, we love an independent queen π¦unsigned int key_usageβ one ofGNUTLS_KEY_*. pick your usage, periodt πunsigned int flagsβ one ofGNUTLS_PKCS11_OBJ_FLAG_*. flag girlies rise π
π DESCRIPTION π
so this function will copy a public key object into a PKCS 11 token specified by a URL. it's giving "move in, make yourself at home" π
valid flags to mark the key:
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 ones allowed for marking, don't go inventing your own, bestie π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, which is the universe's way of saying "not today" π
π¦ SINCE π¦
3.4.6 β vintage but still iconic, we stan a classic π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the girlies:
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. so like, 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 the whole vibe check bestie π«Ά this was gnutls version 3.8.13, page gnutls_pkcs11_copy_pubkey(3) β go forth and copy those public keys, you absolute legend π
πΈπ
π¦ 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