package pkcs11-driver
Module P11_driverSource
High-level PKCS#11 bindings.
High-level interface for PKCS#11 bindings. Contains all functions in the PKCS#11 specification as well as helper functions to make working with PKCS#11 easier. All functions take core P11* types (rather than CK_* types), and structure allocation and populate is handled automatically.
Perform a c_Initialize call with NSS-style initialization parameters as described at https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/PKCS11/Module_Specs
Source
val get_mechanism_info :
t ->
slot:P11.Slot_id.t ->
P11.Mechanism_type.t ->
P11.Mechanism_info.tSource
val copy_object :
t ->
P11.Session_handle.t ->
P11.Object_handle.t ->
P11.Template.t ->
P11.Object_handle.tSource
val get_attribute_value :
t ->
P11.Session_handle.t ->
P11.Object_handle.t ->
P11.Attribute_types.t ->
P11.Template.tSource
val get_attribute_value' :
t ->
P11.Session_handle.t ->
P11.Object_handle.t ->
P11.Attribute_types.t ->
P11.Template.tSource
val get_attribute_value_optimized :
t ->
P11.Attribute_types.t ->
[ `Optimized of P11.Session_handle.t -> P11.Object_handle.t -> P11.Template.t ]Source
val set_attribute_value :
t ->
P11.Session_handle.t ->
P11.Object_handle.t ->
P11.Template.t ->
unitSource
val find_objects :
t ->
?max_size:int ->
P11.Session_handle.t ->
P11.Template.t ->
P11.Object_handle.t listSource
val encrypt :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t ->
P11.Data.tSource
val multipart_encrypt_init :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
unitSource
val multipart_encrypt :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t list ->
P11.Data.tSource
val decrypt :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t ->
P11.Data.tSource
val multipart_decrypt_init :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
unitSource
val multipart_decrypt :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t list ->
P11.Data.tSource
val sign :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t ->
P11.Data.tSource
val sign_recover :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t ->
P11.Data.tSource
val multipart_sign_init :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
unitSource
val multipart_sign :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t list ->
P11.Data.tSource
val verify :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
data:P11.Data.t ->
signature:P11.Data.t ->
unitSource
val verify_recover :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
signature:P11.Data.t ->
P11.Data.tSource
val multipart_verify_init :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
unitSource
val multipart_verify :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t list ->
P11.Data.t ->
unitSource
val generate_key :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Template.t ->
P11.Object_handle.tSource
val generate_key_pair :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Template.t ->
P11.Template.t ->
P11.Object_handle.t * P11.Object_handle.tSource
val wrap_key :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Object_handle.t ->
P11.Data.tSource
val unwrap_key :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Data.t ->
P11.Template.t ->
P11.Object_handle.tSource
val derive_key :
t ->
P11.Session_handle.t ->
P11.Mechanism.t ->
P11.Object_handle.t ->
P11.Template.t ->
P11.Object_handle.tSource
val load_driver :
?log_calls:(string * Format.formatter) ->
?on_unknown:(string -> unit) ->
?load_mode:P11.Load_mode.t ->
string ->
tMay raise Pkcs11.Cannot_load_module. on_unknown will be called with a warning message when unsupported codes are encountered.