package castore
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8d1d399085f733b6b822a8bc059bae6d72459377cbfce4d1a6c8bb1001258b3e
sha512=2c92e6e1ed62dcd872f3ec48d247e987e81d6b39600e6901e2300410dc7df8a0395d8c7d8ad803f5733f1333ae61299d30cb42bdad3ec86910dc651013ec1ddc
Description
README
CAStore 🦫
A portable pure OCaml CA Store, with no dependencies, inspired by Elixir's :castore.
Getting Started
First, install castore in your switch:
# latest published version
opam install castore
# latest development version
opam pin castore git+https://github.com/leostera/castoreNow we can add it to your dune project dependencies:
(package
;...
(depends
(castore (>= "0.0.0"))
;...)
;...)And to your dune stanzas:
(executable
(name my_app)
(libraries castore))And finally we can use it by decoding the certificates, and building a chain of trust we can build our Tls config with.
Here's an example of how to do it:
let decode_pem ca =
let ca = Cstruct.of_string ca in
let cert = X509.Certificate.decode_pem ca in
Result.get_ok cert
in
let cas = List.map decode_pem Ca_store.certificates in
let authenticator = X509.Authenticator.chain_of_trust ~time cas in
(* ... *)Acknowledgements
This project would not be possible without ocaml-tls and ca-certs, in fact, we use ca-certs to generate the Ca_store.cas with code taken from the implementation of ca-certs.
Optional Dependencies
None
Used by (1)
-
riot
>= "0.0.8"
Conflicts
None
Build status
Results of building castore with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.0.2 (this version) | n/a | n/a | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure