GNUTLS_PKCS11_OBJ_LIST_IMPORT_URL4(3)

✨ gnutls_pkcs11_obj_list_import_url4 ✨

okay bestie, so this is a page from the gnutls manual β€” the gnutls_pkcs11_obj_list_import_url4(3) entry, to be exact. it's a whole API function and it's lowkey iconic. let's get into it πŸ’…


🌸 NAME 🌸

gnutls_pkcs11_obj_list_import_url4 β€” an API function. yes girl, that's the whole name, and it's a long one, we respect it 🫢


✨ SYNOPSIS ✨

#include <gnutls/pkcs11.h>

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

like, look at her. five arguments. main character energy fr fr πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pkcs11_obj_t ** p_list β€” an uninitialized object list. and yeah, it may be NULL, no cap.
  • unsigned int * n_list β€” this lil guy is gonna end up holding the size of the list. that's its whole job. slay.
  • const char * url β€” a PKCS 11 url that identifies a set of objects. like a little address for your faves.
  • unsigned int flags β€” an or sequence of GNUTLS_PKCS11_OBJ_* flags. mix and match, it's giving build-your-own-adventure πŸ’«

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? this function enumerates all the objects specified by the PKCS11 URL you hand her. it will initialize and set values to the object pointer list (p_list) you provided. and if you want a list of all available objects, just use a url of 'pkcs11:'. that's the cheat code, iykyk πŸ”₯

⚠️ important bestie moment: all returned objects must be deinitialized using gnutls_pkcs11_obj_deinit(), and p_list must be deinitialized using gnutls_free(). don't forget, or it's leak city 😭

the supported flags in this function 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, also GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT

also, lore drop 🧚: on versions of GnuTLS prior to 3.4.0, the equivalent function was gnutls_pkcs11_obj_list_import_url2(). and that one is also available on this version β€” as a macro which maps to this function. cute, right? a little throwback that still works πŸ’œ


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value. that's the vibe check result, bestie 🌈


πŸ¦‹ SINCE πŸ¦‹

3.4.0 β€” she's been around a minute, and she's still thriving.


😭 REPORTING BUGS 😭

found a bug? don't suffer in silence, report it:


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. generous queen behavior honestly πŸ’–


🌟 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 β€” no details left behind, every flag accounted for, periodt πŸ’…βœ¨

gnutls version 3.8.13, dated right there in the footer with the gnutls_pkcs11_obj_list_import_url4(3) title. mwah, go forth and enumerate πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from