gnutls_pkcs11_obj_get_info(3)

✨ gnutls_pkcs11_obj_get_info ✨

okay bestie, welcome to the gnutls manual page for gnutls_pkcs11_obj_get_info, and yes you're in the right place, this is literally the gnutls man page section 3 πŸŽ€


🌸 NAME 🌸

gnutls_pkcs11_obj_get_info β€” it's an API function, periodt πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_obj_get_info(gnutls_pkcs11_obj_t obj,
gnutls_pkcs11_obj_info_t itype, void * output, size_t * output_size);

πŸ’– ARGUMENTS πŸ’–

  • gnutls_pkcs11_obj_t obj β€” this one should contain a gnutls_pkcs11_obj_t type. like, that's its whole job 🫢
  • gnutls_pkcs11_obj_info_t itype β€” denotes the type of information you're asking for. it's giving "what do you wanna know, bestie" ✨
  • void * output β€” this is where the output gets stored. your lil container πŸŽ€
  • size_t * output_size β€” contains the maximum size of the output buffer, and then it gets overwritten with the actual size. glow-up moment, honestly πŸ”₯

πŸ‘‘ DESCRIPTION πŸ‘‘

This function will return information about the PKCS11 certificate, such as the label, the id, and also the token information about where the key is stored. so much lore in one call, ngl πŸ’œ

When output is text, a null terminated string is written to output, and its string length is written to output_size β€” without the null terminator. the way that it's precise about that... iconic ⭐

If the buffer is too small, output_size will contain the expected buffer size (with the null terminator, for text) and it'll return GNUTLS_E_SHORT_MEMORY_BUFFER. not a vibe, but at least it tells you what size to bring next time 😭

In versions previously to 3.6.0 this function included the null terminator to output_size. After 3.6.0 the output size doesn't include the terminator character. so if you're on old-old gnutls, adjust accordingly, no cap πŸ™ˆ

🌈 RETURNS 🌈

GNUTLS_E_SUCCESS (0) on success, or a negative error code on error. simple. clean. slay ✨


🧚 SINCE 🧚

2.12.0 β€” she's been around a minute, respect her πŸ’…


πŸ“ REPORTING BUGS πŸ“

Report bugs to <bugs@gnutls.org>. 🫢

Home page: 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 generous, so main character πŸ’–


πŸ”₯ 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, you ate that πŸ’… this was gnutls version 3.8.13, from the gnutls_pkcs11_obj_get_info manual page β€” go forth and query your PKCS11 objects, bestie πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from