package pkcs11

  1. Overview
  2. Docs
PKCS#11 OCaml types

Install

Dune Dependency

Authors

Maintainers

Sources

pkcs11-v1.0.1.tbz
sha256=db6bed28e4a75cb3787d0b6feca954a91c9e52e678b8cc73c1058975b1846946
sha512=f764b356cac3dd7718003a158f2a4dad7b8caae981930ab9cfa674a08ebcf3583c531bfcca9ddbb593d0c8e5a64b52381f8c9c702c3a0d0d44000727b095c47a

doc/src/pkcs11/p11_slot_info.ml.html

Source file p11_slot_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
let flags_to_string = P11_flags.(to_pretty_string Slot_info_domain)

type slot_info_flags = P11_flags.t [@@deriving eq, ord, show, of_yojson]

let slot_info_flags_to_yojson flags =
  P11_flags.to_json ~pretty:flags_to_string flags

type t =
  { slotDescription : string
  ; manufacturerID : string
  ; flags : slot_info_flags
  ; hardwareVersion : P11_version.t
  ; firmwareVersion : P11_version.t }
[@@deriving eq, ord, show, yojson]

let to_strings info =
  [ ("Slot Description", P11_helpers.trim_and_quote info.slotDescription)
  ; ("Manufacturer ID", P11_helpers.trim_and_quote info.manufacturerID)
  ; ("Flags", flags_to_string info.flags)
  ; ("Firmware Version", P11_version.to_string info.firmwareVersion)
  ; ("Hardware Version", P11_version.to_string info.hardwareVersion) ]

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
OCaml

Innovation. Community. Security.