package pkcs11
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Bindings to the PKCS#11 cryptographic API
Install
dune-project
Dependency
Authors
Maintainers
Sources
pkcs11-0.9.0.tbz
sha256=0a1dc5fb54d3febbb0024b6fe9bb393f25e4ce6aadbc65fcc114345c5ca3982a
md5=c1a9bd7ed535e9fb31f2e6014567c9af
doc/src/pkcs11/p11_token_info.ml.html
Source file p11_token_info.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84type t = { label : string ; manufacturerID : string ; model : string ; serialNumber : string ; flags : P11_flags.t ; ulMaxSessionCount : P11_ulong.t ; ulSessionCount : P11_ulong.t ; ulMaxRwSessionCount : P11_ulong.t ; ulRwSessionCount : P11_ulong.t ; ulMaxPinLen : P11_ulong.t ; ulMinPinLen : P11_ulong.t ; ulTotalPublicMemory : P11_ulong.t ; ulFreePublicMemory : P11_ulong.t ; ulTotalPrivateMemory : P11_ulong.t ; ulFreePrivateMemory : P11_ulong.t ; hardwareVersion : P11_version.t ; firmwareVersion : P11_version.t ; utcTime : string } [@@deriving of_yojson] let flags_to_string = P11_flags.(to_pretty_string Token_info_domain) let ul_to_string t = P11_ulong.( if is_effectively_infinite t then "CK_EFFECTIVELY_INFINITE" else if is_unavailable_information t then "CK_UNAVAILABLE_INFORMATION" else Unsigned.ULong.to_string t ) let to_strings info = [ "Label", P11_helpers.trim_and_quote info.label; "Manufacturer ID", P11_helpers.trim_and_quote info.manufacturerID; "Model", P11_helpers.trim_and_quote info.model; "Serial Number", P11_helpers.trim_and_quote info.serialNumber; "Flags", flags_to_string info.flags; "Maximum Session Count", ul_to_string info.ulMaxSessionCount; "Session count", ul_to_string info.ulSessionCount; "Maximum Read-Write Session Count", ul_to_string info.ulMaxRwSessionCount; "Read-Write Session Count", ul_to_string info.ulRwSessionCount; "Maximum PIN Length", Unsigned.ULong.to_string info.ulMaxPinLen; "Minimim PIN Length", Unsigned.ULong.to_string info.ulMinPinLen; "Total Public Memory", ul_to_string info.ulTotalPublicMemory; "Free Public Memory", ul_to_string info.ulFreePublicMemory; "Total Private Memory", ul_to_string info.ulTotalPrivateMemory; "Free Private Memory", ul_to_string info.ulFreePrivateMemory; "Hardware Version", (P11_version.to_string info.hardwareVersion); "Firmware Version", (P11_version.to_string info.firmwareVersion); "UTC Time", P11_helpers.trim_and_quote info.utcTime; ] let to_string ?newlines ?indent info = P11_helpers.string_of_record ?newlines ?indent (to_strings info) let to_strings info = P11_helpers.strings_of_record @@ to_strings info let to_yojson info = let ulong x = `String (Unsigned.ULong.to_string x) in `Assoc [ "label", `String info.label; "manufacturerID", `String info.manufacturerID; "model", `String info.model; "serialNumber", `String info.serialNumber; "flags", P11_flags.to_json ~pretty:flags_to_string info.flags; "ulMaxSessionCount", ulong info.ulMaxSessionCount; "ulSessionCount", ulong info.ulSessionCount; "ulMaxRwSessionCount", ulong info.ulMaxRwSessionCount; "ulRwSessionCount", ulong info.ulRwSessionCount; "ulMaxPinLen", ulong info.ulMaxPinLen; "ulMinPinLen", ulong info.ulMinPinLen; "ulTotalPublicMemory", ulong info.ulTotalPublicMemory; "ulFreePublicMemory", ulong info.ulFreePublicMemory; "ulTotalPrivateMemory", ulong info.ulTotalPrivateMemory; "ulFreePrivateMemory", ulong info.ulFreePrivateMemory; "hardwareVersion", P11_version.to_yojson info.hardwareVersion; "firmwareVersion", P11_version.to_yojson info.firmwareVersion; "utcTime", `String info.utcTime; ]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>