Skip to content

Commit 940ec36

Browse files
authored
Merge pull request #1084 from art-w/ci-fix
chore: fix CI
2 parents 1568940 + 211c825 commit 940ec36

File tree

12 files changed

+29
-34
lines changed

12 files changed

+29
-34
lines changed

.github/workflows/workflow.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- ubuntu-latest
2323
- macos-latest
2424
ocaml-compiler:
25-
- "4.14"
2625
- "5"
2726
local-packages:
2827
- |
@@ -66,7 +65,6 @@ jobs:
6665
- ubuntu-latest
6766
- macos-latest
6867
ocaml-compiler:
69-
- "4.14"
7068
- "5"
7169
local-packages:
7270
- |

cohttp-async.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ depends: [
3636
"core_unix" {>= "v0.14.0"}
3737
"conduit-async" {>= "1.2.0"}
3838
"magic-mime"
39-
"mirage-crypto" {with-test}
39+
"digestif" {with-test}
4040
"logs"
4141
"fmt" {>= "0.8.2"}
4242
"sexplib0"

cohttp-async/examples/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(executables
22
(names hello_world receive_post)
33
(libraries
4-
mirage-crypto
4+
digestif.c
55
http
66
cohttp-async
77
base

cohttp-async/examples/s3_cp.ml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ module Auth = struct
171171

172172
let digest s =
173173
(* string -> sha256 as a hex string *)
174-
Mirage_crypto.Hash.(digest `SHA256 (Cstruct.of_string s))
175-
|> Compat.cstruct_to_hex_string
174+
Digestif.SHA256.(digest_string s |> to_hex)
176175

177176
let make_amz_headers ?body time =
178177
(* Return x-amz-date and x-amz-sha256 headers *)
@@ -239,16 +238,12 @@ module Auth = struct
239238
Printf.sprintf "AWS4-HMAC-SHA256\n%s\n%s\n%s" time_str scope_str hashed_req
240239

241240
let make_signing_key ?date ~region ~service ~secret_access_key () =
242-
let mac k v =
243-
Mirage_crypto.Hash.(mac `SHA256 ~key:k (Cstruct.of_string v))
244-
in
241+
let mac k v = Digestif.SHA256.(hmac_string ~key:k v |> to_raw_string) in
245242
let date' =
246243
match date with None -> Date.today ~zone:Time.Zone.utc | Some d -> d
247244
in
248245
let date_str = Date.to_string_iso8601_basic date' in
249-
let date_key =
250-
mac (Cstruct.of_string ("AWS4" ^ secret_access_key)) date_str
251-
in
246+
let date_key = mac ("AWS4" ^ secret_access_key) date_str in
252247
let date_region_key = mac date_key (string_of_region region) in
253248
let date_region_service_key =
254249
mac date_region_key (string_of_service service)
@@ -278,14 +273,12 @@ module Auth = struct
278273
(string_of_service service)
279274
in
280275
let signature =
281-
Mirage_crypto.Hash.(
282-
mac `SHA256 ~key:signing_key (Cstruct.of_string string_to_sign))
276+
Digestif.SHA256.(hmac_string ~key:signing_key string_to_sign |> to_hex)
283277
in
284278
let auth_header =
285279
Printf.sprintf
286280
"AWS4-HMAC-SHA256 Credential=%s,SignedHeaders=%s,Signature=%s" creds
287-
signed_headers
288-
(Compat.cstruct_to_hex_string signature)
281+
signed_headers signature
289282
in
290283
[ ("Authorization", auth_header) ]
291284
end

cohttp-curl-async.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ doc: "https://mirage.github.io/ocaml-cohttp/"
2121
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
2222
depends: [
2323
"dune" {>= "3.0"}
24-
"ocurl"
24+
"ocurl" {>= "0.9.2"}
2525
"http" {= version}
2626
"stringext"
2727
"cohttp-curl" {= version}

cohttp-curl-lwt.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
2222
depends: [
2323
"dune" {>= "3.0"}
2424
"ocaml" {>= "4.08"}
25-
"ocurl"
25+
"ocurl" {>= "0.9.2"}
2626
"http" {= version}
2727
"cohttp-curl" {= version}
2828
"stringext"

cohttp-curl.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
2020
depends: [
2121
"dune" {>= "3.0"}
2222
"ocaml" {>= "4.08"}
23-
"ocurl"
23+
"ocurl" {>= "0.9.2"}
2424
"http" {= version}
2525
"stringext"
2626
"odoc" {with-doc}

cohttp-eio.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ depends: [
2828
"mdx" {with-test}
2929
"logs"
3030
"uri"
31-
"tls-eio" {with-test & >= "0.17.2"}
31+
"tls-eio" {with-test & >= "1.0.0"}
3232
"mirage-crypto-rng-eio" {with-test & >= "0.11.2"}
3333
"fmt"
3434
"ptime"

cohttp-eio/examples/client_tls.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ let null_auth ?ip:_ ~host:_ _ =
99
Ok None (* Warning: use a real authenticator in your code! *)
1010

1111
let https ~authenticator =
12-
let tls_config = Tls.Config.client ~authenticator () in
12+
let tls_config =
13+
match Tls.Config.client ~authenticator () with
14+
| Error (`Msg msg) -> failwith ("tls configuration problem: " ^ msg)
15+
| Ok tls_config -> tls_config
16+
in
1317
fun uri raw ->
1418
let host =
1519
Uri.host uri

cohttp-lwt-unix/test/test_parser.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ let res_content_parse () =
221221
Rep_io.read_body_chunk reader >>= fun body ->
222222
assert_equal
223223
~printer:(fun chunk ->
224-
Transfer.sexp_of_chunk chunk |> Sexplib.Sexp.to_string_hum)
224+
Transfer.sexp_of_chunk chunk |> Sexplib0.Sexp.to_string_hum)
225225
(Transfer.Final_chunk "home=Cosby&favorite+flavor=flies") body;
226226
return ()
227227
| _ -> assert false

0 commit comments

Comments
 (0)