gnutls_pkcs11_privkey_get_info(3)
β¨ gnutls_pkcs11_privkey_get_info β¨
okay so bestie, this one lives in the gnutls manual, section 3, and it's literally the glow-up guide for peeking at your PKCS 11 private key's lore π
π NAME π
gnutls_pkcs11_privkey_get_info β an API function, no cap
π¦ SYNOPSIS π¦
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_privkey_get_info(gnutls_pkcs11_privkey_t pkey,
gnutls_pkcs11_obj_info_t itype, void * output, size_t * output_size);
πΈ ARGUMENTS πΈ
gnutls_pkcs11_privkey_t pkeyβ bestie this one should contain agnutls_pkcs11_privkey_ttype, like that's its whole jobgnutls_pkcs11_obj_info_t itypeβ says which type of information you're asking for, main character decision frvoid * outputβ the spot where the output gets stored, it's giving "put the tea here"size_t * output_sizeβ holds the max size of the output on the way in, and then gets overwritten with the actual size. so it's a glow-up in place, iconic π
π DESCRIPTION π
So this function returns info about the PKCS 11 private key β think the label, the id, and also the token information about where the key is stored π«Ά
And listen: when the output is text, it returns a null terminated string, even though output_size contains the size of the actual data only. yes, both. that's just the vibe, iykyk β¨
π RETURNS π
GNUTLS_E_SUCCESS (that's 0) on success, or a negative error code if something went wrong π
π REPORTING BUGS π
Found a bug? spill it to <bugs@gnutls.org> π
Home page, right here: 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/
okay that's the whole page, and it's giving peak utility π This one came straight from gnutls 3.8.13, so when you're out here slaying with gnutls_pkcs11_privkey_get_info, remember who told you π bye bestie, go read your keys π¦
π¦ 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