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 a gnutls_pkcs11_privkey_t type, like that's its whole job
  • gnutls_pkcs11_obj_info_t itype β€” says which type of information you're asking for, main character decision fr
  • void * 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 Β© 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