package conex

  1. Overview
  2. Docs

Private key IO

val write : Conex_io.t -> string -> Conex_resource.Key.priv -> (unit, string) Stdlib.result

write_private_key prov id key writes the given key to disk (in "~/.conex/", using the basedir of prov as file prefix.

type err = [
  1. | `NotFound of string
  2. | `Msg of string
]

Potential read errors

val pp_err : err Conex_utils.fmt

pp_err err pretty prints err.

val read : Conex_io.t -> string -> (Conex_resource.Key.priv, err) Stdlib.result

read_private_key prov id is either Ok priv or an Error. The private key corresponding to prov and id is loaded.

val find_ids : unit -> ((string * string) list, string) Stdlib.result

find_ids () is a (id, path) list of private keys present.

OCaml

Innovation. Community. Security.