Gck.Module¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
PKCS11 Function List |
||
r/w/co |
Path to the PKCS11 Module |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Use |
|
Use |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
||
reserved |
[ |
r |
Class Details¶
- class Gck.Module(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Holds a loaded PKCS#11 module. A PKCS#11 module is a shared library.
You can load and initialize a PKCS#11 module with the [func`Module`.initialize] call. If you already have a loaded and initialized module that you’d like to use with the various Gck functions, then you can use [ctor`Module`.new].
- classmethod initialize(path, cancellable)[source]¶
- Parameters:
path (
str
) – The file system path to the PKCS#11 module to load.cancellable (
Gio.Cancellable
orNone
) – optional cancellation object
- Raises:
- Returns:
The loaded PKCS#11 module or
None
if failed.- Return type:
Load and initialize a PKCS#11 module represented by a
Gck.Module
object.
- classmethod initialize_async(path, cancellable, callback, *user_data)[source]¶
- Parameters:
path (
str
) – the file system path to the PKCS#11 module to loadcancellable (
Gio.Cancellable
orNone
) – optional cancellation objectcallback (
Gio.AsyncReadyCallback
orNone
) – a callback which will be called when the operation completes
Asynchronously load and initialize a PKCS#11 module represented by a [class`Module`] object.
- classmethod initialize_finish(result)[source]¶
- Parameters:
result (
Gio.AsyncResult
) – the asynchronous result- Raises:
- Returns:
The initialized module, or
None
- Return type:
Gck.Module
orNone
Finishes the asynchronous initialize operation.
- equal(module2)[source]¶
- Parameters:
module2 (
Gck.Module
) – a pointer to the secondGck.Module
- Returns:
True
if module1 and module2 are equal.False
if either is not aGck.Module
.- Return type:
Checks equality of two modules. Two
Gck.Module
objects can point to the same underlying PKCS#11 module.
- get_info()[source]¶
- Returns:
the module info; release this with
Gck.ModuleInfo.free
()- Return type:
Get the info about a PKCS#11 module.
- get_path()[source]¶
- Returns:
The path, do not modify or free this value.
- Return type:
Get the file path of this module. This may not be an absolute path, and usually reflects the path passed to [func`Module`.initialize].
- get_slots(token_present)[source]¶
- Parameters:
token_present (
bool
) – Whether to limit only to slots with a token present.- Returns:
The possibly empty list of slots. Release this with gck_list_unref_free().
- Return type:
[
Gck.Slot
]
Get the
Gck.Slot
objects for a given module.
- hash()[source]¶
- Returns:
An integer that can be used as a hash value, or 0 if invalid.
- Return type:
Create a hash value for the
Gck.Module
.This function is intended for easily hashing a [class`Module`] to add to a [struct`GLib`.HashTable] or similar data structure.
- match(uri)[source]¶
- Parameters:
uri (
Gck.UriData
) – the uri to match against the module- Returns:
whether the URI matches or not
- Return type:
Check whether the PKCS#11 URI matches the module
- do_authenticate_object(object, label, password) virtual¶
- Parameters:
object (
Gck.Object
) –label (
str
) –password (
str
) –
- Return type:
Signal Details¶
- Gck.Module.signals.authenticate_object(module, object, label, password)¶
- Signal Name:
authenticate-object
- Flags:
- Parameters:
module (
Gck.Module
) – The object which received the signalobject (
Gck.Object
) – The object to be authenticated.label (
str
) – A displayable label which describes the object.password (
object
orNone
) – Astr
where a password should be returned.
- Return type:
Use
Gck.Session.set_interaction
() instead of connecting to this signal.Deprecated since version 3.4.
- Gck.Module.signals.authenticate_slot(module, slot, string, password)¶
- Signal Name:
authenticate-slot
- Flags:
- Parameters:
- Return type:
Use
Gck.Session.set_interaction
() instead of connecting to this signal.Deprecated since version 3.4.
Property Details¶
- Gck.Module.props.functions¶
- Name:
functions
- Type:
- Default Value:
- Flags:
The raw PKCS#11 function list for the module.
This points to a CK_FUNCTION_LIST structure.