Logo Search packages:      
Sourcecode: p11-kit version File versions  Download package

Public Attributes

_Module Struct Reference

Collaboration diagram for _Module:
Collaboration graph

List of all members.

Public Attributes

void * dl_module
int initialize_count
char * name
int ref_count

Detailed Description

SECTION:p11-kit : Modules : Module loading and initializing

PKCS#11 modules are used by crypto libraries and applications to access crypto objects (like keys and certificates) and to perform crypto operations.

In order for applications to behave consistently with regard to the user's installed PKCS#11 modules, each module must be registered so that applications or libraries know that they should load it.

The functions here provide support for initializing registered modules. The p11_kit_initialize_registered() function should be used to load and initialize the registered modules. When done, the p11_kit_finalize_registered() function should be used to release those modules and associated resources.

In addition p11_kit_registered_option() can be used to access other parts of the module configuration.

When multiple consumers of a module (such as libraries or applications) are in the same process, coordination of the initialization and finalization of PKCS#11 modules is required. The functions here automatically provide initialization reference counting to make this work.

If a consumer wishes to load an arbitrary PKCS#11 module that's not registered, that module should be initialized with p11_kit_initialize_module() and finalized with p11_kit_finalize_module(). The module's own C_Initialize and C_Finalize methods should not be called directly.

Modules are represented by a pointer to their CK_FUNCTION_LIST entry points. This means that callers can load modules elsewhere, using dlopen() for example, and then still use these methods on them.

Definition at line 97 of file modules.c.

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index