gnutls_pkcs11_obj_export2(3)

πŸ’– gnutls_pkcs11_obj_export2(3) πŸ’–

okay bestie, so this one lives in the gnutls manual (that's the manual name, cute right) and it's literally the "gimme the actual bytes out of my PKCS#11 object" function. let's get into it ✨


🌸 SYNOPSIS 🌸

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_obj_export2(gnutls_pkcs11_obj_t obj, gnutls_datum_t * out);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pkcs11_obj_t obj β€” the object you're holding, bestie. this is the one you're trying to export from 🫢
  • gnutls_datum_t * out β€” this pointer is where the object data ends up. it will contain the object data, no cap.

✨ DESCRIPTION ✨

so this function will export the PKCS11 object data. that's the whole vibe. πŸ’…

ngl though, it is normal for data to be inaccessible β€” some objects just don't wanna be read like that πŸ™ˆ β€” and in that case GNUTLS_E_INVALID_REQUEST will be returned. not a bug, just how it is.

the output buffer is allocated using gnutls_malloc(), so that's the allocator you're dealing with. remember it. your future self will thank you.


πŸ”₯ RETURNS πŸ”₯

in case of failure a negative error code will be returned, and GNUTLS_E_SUCCESS (0) on success. so like, check for that zero, bestie. 0 = slay. anything negative = 😭.


⭐ SINCE ⭐

3.1.3 β€” she's been around a minute, a true icon πŸ‘‘


πŸ’œ REPORTING BUGS πŸ’œ

found something cursed? 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 yes, go off, distribute it, 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, you ate that πŸ’– go export some objects and be the main character of your own PKCS#11 adventure πŸ¦‹

gnutls version 3.8.13, page gnutls_pkcs11_obj_export2(3) β€” mwah, that's a wrap πŸŽ€βœ¨

πŸ“¦ where this page comes from