gnutls_pkcs11_obj_get_ptr(3)

πŸ’– gnutls_pkcs11_obj_get_ptr(3) πŸ’–

okay bestie, so this one lives in the gnutls manual (yes, that gnutls, the ✨iconic✨ TLS library) and it's literally just called gnutls_pkcs11_obj_get_ptr. She's an API function, she's shy, she just wants to hand you some pointers. no cap. 🫢


🌸 NAME 🌸

gnutls_pkcs11_obj_get_ptr β€” API function πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_obj_get_ptr(gnutls_pkcs11_obj_t obj, void ** ptr, void
** session, void ** ohandle, unsigned long * slot_id, unsigned int
flags);

like, that's the whole vibe. one include, one function call, six arguments. slay. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pkcs11_obj_t obj β€” bestie this one should contain a gnutls_pkcs11_obj_t type. that's the whole assignment. πŸ’œ
  • void ** ptr β€” she will contain the CK_FUNCTION_LIST_PTR pointer (and yes, she may be NULL, no pressure). πŸ‘‘
  • void ** session β€” will contain the CK_SESSION_HANDLE of the object. that's the tea. πŸ“
  • void ** ohandle β€” will contain the CK_OBJECT_HANDLE of the object. iconic. ✨
  • unsigned long * slot_id β€” the identifier of the slot (may be NULL, she's flexible like that). 🌈
  • unsigned int flags β€” an Or sequence of GNUTLS_PKCS11_OBJ_* flags. bring the whole alphabet if you want. πŸ”₯

πŸ’« DESCRIPTION πŸ’«

okay so what she does: she obtains the PKCS11 session handles of an object. that's it. that's the job.

⚠️ but listen β€” session and ohandle must be deinitialized by the caller. that's on YOU, bestie. not her. she hands them over and walks away like a main character. 😭

the returned pointers are independent of the obj lifetime β€” so even if obj dips out of the function, those pointers are still doing their thing. no strings attached, fr fr. πŸ’–


⭐ RETURNS ⭐

GNUTLS_E_SUCCESS (0) on success, or a negative error code if the vibe check fails. 😭


πŸŽ€ SINCE πŸŽ€

3.6.3 β€” she's been around. vintage. antique. a legend. πŸ’…


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, report it to <bugs@gnutls.org>.

home page is right here: https://www.gnutls.org β€” go say hi. 🫢


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. (yes, that means you can share the love, just keep the receipts. periodt. ✨)


🌸 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, go visit:

https://www.gnutls.org/manual/

that's your girl. that's where the rest of the lore lives. πŸ“š


and that's the whole page, bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

kisses, this was gnutls_pkcs11_obj_get_ptr(3) from the gnutls manual, version 3.8.13. go forth and deinitialize your handles. πŸ’€πŸ’œπŸ‘‘

πŸ“¦ where this page comes from