Sigstore signing and verification for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to ocamlformat 0.29.0; fix csvt/sexpt streaming; reformat

- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0

+13 -14
+13 -14
lib/sigstore.mli
··· 18 18 {2 Example} 19 19 20 20 {[ 21 - Eio_main.run @@ fun env -> 22 - Eio.Switch.run @@ fun sw -> 23 - let session = Requests.v ~sw env in 24 - let now = Eio.Time.now env#clock |> Ptime.of_float_s |> Option.get in 21 + Eio_main.run @@ fun env -> 22 + Eio.Switch.run @@ fun sw -> 23 + let session = Requests.v ~sw env in 24 + let now = Eio.Time.now env#clock |> Ptime.of_float_s |> Option.get in 25 25 26 - (* Sign an artifact *) 27 - let bundle = 28 - Sigstore.sign session ~now ~id_token:"eyJ..." 29 - ~artifact:(Sigstore.Artifact.of_string "hello world") 30 - in 26 + (* Sign an artifact *) 27 + let bundle = 28 + Sigstore.sign session ~now ~id_token:"eyJ..." 29 + ~artifact:(Sigstore.Artifact.of_string "hello world") 30 + in 31 31 32 - (* Verify *) 33 - match Sigstore.verify session ~now bundle with 34 - | Ok identity -> Format.printf "Signed by %s\n" identity.email 35 - | Error e -> 36 - Format.eprintf "Verification failed: %a\n" Sigstore.pp_error e 32 + (* Verify *) 33 + match Sigstore.verify session ~now bundle with 34 + | Ok identity -> Format.printf "Signed by %s\n" identity.email 35 + | Error e -> Format.eprintf "Verification failed: %a\n" Sigstore.pp_error e 37 36 ]} *) 38 37 39 38 (** {1 Hash Algorithms}