diff options
author | Stef Walter <stefw@gnome.org> | 2013-02-06 21:57:45 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-05-21 10:47:51 +0200 |
commit | 5c19f0cf66495f00ccf69eba1d0915f862a88c8d (patch) | |
tree | e8ae733062507a0a4cc5c134d1fdd62cf055cddd /tools/list.c | |
parent | ff853bd7902e271256cada4a1b20a3d46b519b69 (diff) |
p11-kit: Managed PKCS#11 module loading
Support a new managed style module loading for PKCS#11 modules. This
allows us to better coordinate between multiple callers of the same
PKCS#11 modules and provide hooks into their behavior.
This meant redoing the public facing API. The old methods are now
deprecated, marked and documented as such.
Diffstat (limited to 'tools/list.c')
-rw-r--r-- | tools/list.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/tools/list.c b/tools/list.c index da99940..fe028ae 100644 --- a/tools/list.c +++ b/tools/list.c @@ -203,20 +203,15 @@ print_modules (void) CK_FUNCTION_LIST_PTR *module_list; char *name; char *path; - CK_RV rv; int i; - rv = p11_kit_initialize_registered (); - if (rv != CKR_OK) { - p11_message ("couldn't initialize registered modules: %s", - p11_kit_strerror (rv)); + module_list = p11_kit_modules_load_and_initialize (0); + if (!module_list) return 1; - } - module_list = p11_kit_registered_modules (); for (i = 0; module_list[i]; i++) { - name = p11_kit_registered_module_to_name (module_list[i]); - path = p11_kit_registered_option (module_list[i], "module"); + name = p11_kit_module_get_name (module_list[i]); + path = p11_kit_config_option (module_list[i], "module"); printf ("%s: %s\n", name ? name : "(null)", @@ -226,9 +221,8 @@ print_modules (void) free (name); free (path); } - free (module_list); - p11_kit_finalize_registered (); + p11_kit_modules_finalize_and_release (module_list); return 0; } |