summaryrefslogtreecommitdiff
path: root/p11-kit/p11-kit.h
diff options
context:
space:
mode:
Diffstat (limited to 'p11-kit/p11-kit.h')
-rw-r--r--p11-kit/p11-kit.h65
1 files changed, 43 insertions, 22 deletions
diff --git a/p11-kit/p11-kit.h b/p11-kit/p11-kit.h
index f83cbd0..a07bf40 100644
--- a/p11-kit/p11-kit.h
+++ b/p11-kit/p11-kit.h
@@ -44,54 +44,75 @@
#ifdef CRYPTOKI_GNU
typedef ck_rv_t CK_RV;
typedef struct ck_function_list* CK_FUNCTION_LIST_PTR;
+typedef struct ck_function_list CK_FUNCTION_LIST;
#endif
+#include "p11-kit/deprecated.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-CK_RV p11_kit_initialize_registered (void);
+enum {
+ P11_KIT_MODULE_UNMANAGED = 1 << 0,
+ P11_KIT_MODULE_CRITICAL = 1 << 1,
+};
-CK_RV p11_kit_finalize_registered (void);
+typedef void (* p11_kit_destroyer) (void *data);
-CK_FUNCTION_LIST_PTR* p11_kit_registered_modules (void);
+CK_FUNCTION_LIST ** p11_kit_modules_load (const char *reserved,
+ int flags);
-char* p11_kit_registered_module_to_name (CK_FUNCTION_LIST_PTR module);
+CK_RV p11_kit_modules_initialize (CK_FUNCTION_LIST **modules,
+ p11_kit_destroyer failure_callback);
-CK_FUNCTION_LIST_PTR p11_kit_registered_name_to_module (const char *name);
+CK_FUNCTION_LIST ** p11_kit_modules_load_and_initialize (int flags);
-char* p11_kit_registered_option (CK_FUNCTION_LIST_PTR module,
- const char *field);
+CK_RV p11_kit_modules_finalize (CK_FUNCTION_LIST **modules);
-CK_RV p11_kit_initialize_module (CK_FUNCTION_LIST_PTR module);
+void p11_kit_modules_release (CK_FUNCTION_LIST **modules);
-CK_RV p11_kit_finalize_module (CK_FUNCTION_LIST_PTR module);
+void p11_kit_modules_finalize_and_release (CK_FUNCTION_LIST **modules);
-CK_RV p11_kit_load_initialize_module (const char *module_path,
- CK_FUNCTION_LIST_PTR *module);
+CK_FUNCTION_LIST * p11_kit_module_for_name (CK_FUNCTION_LIST **modules,
+ const char *name);
-const char* p11_kit_strerror (CK_RV rv);
+char * p11_kit_module_get_name (CK_FUNCTION_LIST *module);
-size_t p11_kit_space_strlen (const unsigned char *string,
- size_t max_length);
+int p11_kit_module_get_flags (CK_FUNCTION_LIST *module);
-char* p11_kit_space_strdup (const unsigned char *string,
- size_t max_length);
+CK_FUNCTION_LIST * p11_kit_module_load (const char *module_path,
+ int flags);
-#ifdef P11_KIT_FUTURE_UNSTABLE_API
+CK_RV p11_kit_module_initialize (CK_FUNCTION_LIST *module);
+
+CK_RV p11_kit_module_finalize (CK_FUNCTION_LIST *module);
-void p11_kit_set_progname (const char *progname);
+void p11_kit_module_release (CK_FUNCTION_LIST *module);
-void p11_kit_be_quiet (void);
+char * p11_kit_config_option (CK_FUNCTION_LIST *module,
+ const char *option);
-void p11_kit_be_loud (void);
+const char* p11_kit_strerror (CK_RV rv);
-const char* p11_kit_message (void);
+size_t p11_kit_space_strlen (const unsigned char *string,
+ size_t max_length);
-typedef void (* p11_kit_destroyer) (void *data);
+char* p11_kit_space_strdup (const unsigned char *string,
+ size_t max_length);
+
+#ifdef P11_KIT_FUTURE_UNSTABLE_API
+
+void p11_kit_set_progname (const char *progname);
+
+void p11_kit_be_quiet (void);
+
+void p11_kit_be_loud (void);
#endif
+const char * p11_kit_message (void);
+
#ifdef __cplusplus
} /* extern "C" */
#endif