Module P11_driver
High-level PKCS#11 bindings.
exceptionCKR of P11.RV.t
module type S = sig ... endHigh-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.
type t= (module S)
val initialize : t -> unitval initialize_nss : t -> params:Pkcs11.Nss_initialize_arg.u -> unitPerform 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
val finalize : t -> unitval get_info : t -> P11.Info.tval get_slot : t -> P11.Slot.t -> (P11.Slot_id.t, string) Stdlib.resultval get_slot_list : t -> bool -> P11.Slot_id.t listval get_slot_info : t -> slot:P11.Slot_id.t -> P11.Slot_info.tval get_token_info : t -> slot:P11.Slot_id.t -> P11.Token_info.tval get_mechanism_list : t -> slot:P11.Slot_id.t -> P11.Mechanism_type.t listval get_mechanism_info : t -> slot:P11.Slot_id.t -> P11.Mechanism_type.t -> P11.Mechanism_info.tval init_token : t -> slot:P11.Slot_id.t -> pin:string -> label:string -> unitval init_PIN : t -> P11.Session_handle.t -> pin:string -> unitval set_PIN : t -> P11.Session_handle.t -> oldpin:string -> newpin:string -> unitval open_session : t -> slot:P11.Slot_id.t -> flags:P11.Flags.t -> P11.Session_handle.tval close_session : t -> P11.Session_handle.t -> unitval close_all_sessions : t -> slot:P11.Slot_id.t -> unitval get_session_info : t -> P11.Session_handle.t -> P11.Session_info.tval login : t -> P11.Session_handle.t -> P11.User_type.t -> string -> unitval logout : t -> P11.Session_handle.t -> unitval create_object : t -> P11.Session_handle.t -> P11.Template.t -> P11.Object_handle.tval copy_object : t -> P11.Session_handle.t -> P11.Object_handle.t -> P11.Template.t -> P11.Object_handle.tval destroy_object : t -> P11.Session_handle.t -> P11.Object_handle.t -> unitval get_attribute_value : t -> P11.Session_handle.t -> P11.Object_handle.t -> P11.Attribute_types.t -> P11.Template.tval get_attribute_value' : t -> P11.Session_handle.t -> P11.Object_handle.t -> P11.Attribute_types.t -> P11.Template.tval get_attribute_value_optimized : t -> P11.Attribute_types.t -> [ `Optimized of P11.Session_handle.t -> P11.Object_handle.t -> P11.Template.t ]val set_attribute_value : t -> P11.Session_handle.t -> P11.Object_handle.t -> P11.Template.t -> unitval find_objects : t -> ?max_size:int -> P11.Session_handle.t -> P11.Template.t -> P11.Object_handle.t listval encrypt : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t -> P11.Data.tval multipart_encrypt_init : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> unitval multipart_encrypt_chunck : t -> P11.Session_handle.t -> P11.Data.t -> P11.Data.tval multipart_encrypt_final : t -> P11.Session_handle.t -> P11.Data.tval multipart_encrypt : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t list -> P11.Data.tval decrypt : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t -> P11.Data.tval multipart_decrypt_init : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> unitval multipart_decrypt_chunck : t -> P11.Session_handle.t -> P11.Data.t -> P11.Data.tval multipart_decrypt_final : t -> P11.Session_handle.t -> P11.Data.tval multipart_decrypt : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t list -> P11.Data.tval sign : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t -> P11.Data.tval sign_recover : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t -> P11.Data.tval multipart_sign_init : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> unitval multipart_sign_chunck : t -> P11.Session_handle.t -> P11.Data.t -> unitval multipart_sign_final : t -> P11.Session_handle.t -> P11.Data.tval multipart_sign : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t list -> P11.Data.tval verify : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> data:P11.Data.t -> signature:P11.Data.t -> unitval verify_recover : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> signature:P11.Data.t -> P11.Data.tval multipart_verify_init : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> unitval multipart_verify_chunck : t -> P11.Session_handle.t -> P11.Data.t -> unitval multipart_verify_final : t -> P11.Session_handle.t -> P11.Data.t -> unitval multipart_verify : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t list -> P11.Data.t -> unitval generate_key : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Template.t -> P11.Object_handle.tval generate_key_pair : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Template.t -> P11.Template.t -> P11.Object_handle.t * P11.Object_handle.tval wrap_key : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Object_handle.t -> P11.Data.tval unwrap_key : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Data.t -> P11.Template.t -> P11.Object_handle.tval derive_key : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Object_handle.t -> P11.Template.t -> P11.Object_handle.tval digest : t -> P11.Session_handle.t -> P11.Mechanism.t -> P11.Data.t -> P11.Data.t
module Wrap_low_level_bindings : functor (X : Pkcs11.LOW_LEVEL_BINDINGS) -> Sval load_driver : ?log_calls:(string * Stdlib.Format.formatter) -> ?on_unknown:(string -> unit) -> ?load_mode:P11.Load_mode.t -> string -> tMay raise
Pkcs11.Cannot_load_module.on_unknownwill be called with a warning message when unsupported codes are encountered.