GNUTLS_PKCS11_OBJ_LIST_IMPORT_URL3(3)

✨ NAME ✨

gnutls_pkcs11_obj_list_import_url3 β€” bestie, it's an API function πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_obj_list_import_url3(gnutls_pkcs11_obj_t * p_list,
unsigned int * n_list, const char * url, unsigned int flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pkcs11_obj_t * p_list β€” an object list that has not been initialized yet, and yeah, it's allowed to be NULL. no thoughts, just vibes πŸ™ˆ
  • unsigned int * n_list β€” when you hand it over, it should already hold the maximum size of the list. when it comes back? it holds the actual size. glow-up fr fr ✨
  • const char * url β€” a PKCS 11 url that identifies a whole set of objects 🫢
  • unsigned int flags β€” an or-sequence of GNUTLS_PKCS11_OBJ_* flags, mix and match as you please πŸ’«

πŸ’– DESCRIPTION πŸ’–

okay so. this function initializes and sets values on an object list, using every single object that the PKCS 11 URL points at. it's giving "collect them all" energy πŸ‘‘

it enumerates all the objects specified by the PKCS11 URL you provided. it expects an already-allocated p_list that has *n_list elements β€” and that value gets updated to the actual number of objects that are present. the p_list objects get initialized and set by this function, no cap. and if what you actually want is a list of every available object? just use a url of 'pkcs11:'. iconic, honestly. πŸ’…

🌸 every single object that comes back must be deinitialized using gnutls_pkcs11_obj_deinit(). don't ghost them, bestie, that's a memory leak and it's not the moment.

the flags that this function supports are:

  • GNUTLS_PKCS11_OBJ_FLAG_LOGIN
  • GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO
  • GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE
  • GNUTLS_PKCS11_OBJ_FLAG_CRT
  • GNUTLS_PKCS11_OBJ_FLAG_PUBKEY
  • GNUTLS_PKCS11_OBJ_FLAG_PRIVKEY
  • GNUTLS_PKCS11_OBJ_FLAG_WITH_PRIVKEY
  • GNUTLS_PKCS11_OBJ_FLAG_MARK_CA
  • GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED
  • and, since 3.5.1, GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT 🌈

and here's a lil history lesson for the lore girlies πŸ“œ: on versions of GnuTLS prior to 3.4.0, the equivalent function was gnutls_pkcs11_obj_list_import_url(). that one is also available on this version β€” as a macro that maps to this function. same energy, different name, slay πŸ¦‹


πŸ“ RETURNS πŸ“

on success you get GNUTLS_E_SUCCESS (0) back, and otherwise it's a negative error value. a win is a win, and a negative is a vibe check that did not pass 😭


⭐ SINCE ⭐

3.4.0


🧚 REPORTING BUGS 🧚

found a bug? tell the people! 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 true, so generous, we love to see it πŸ’œ


🌈 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/


and that's the whole page, bestie 🫢 this one lives in the gnutls manual, version 3.8.13 β€” go forth and enumerate your PKCS 11 objects, main character energy only βœ¨πŸ’…πŸŽ€

πŸ“¦ where this page comes from