Skip to content

Commit d8d26b4

Browse files
committed
Rename tls-miou tls-miou-unix
1 parent 8fea402 commit d8d26b4

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

miou/dune

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
(library
2-
(name tls_miou)
3-
(public_name tls-miou)
4-
(libraries miou.unix tls)
5-
(instrumentation
6-
(backend bisect_ppx)))
2+
(name tls_miou_unix)
3+
(public_name tls-miou-unix)
4+
(libraries miou.unix tls))

miou/tests/dune

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
ptime
88
ptime.clock.os
99
crowbar
10-
tls-miou)
10+
tls-miou-unix)
1111
(instrumentation
1212
(backend bisect_ppx)))

miou/tests/fuzz.ml

+11-11
Original file line numberDiff line numberDiff line change
@@ -131,38 +131,38 @@ let run ~role:_ actions tls =
131131
Miou.yield ();
132132
go buf tls actions
133133
| Send str :: actions ->
134-
Tls_miou.write tls str;
134+
Tls_miou_unix.write tls str;
135135
go buf tls actions
136136
| Close :: actions ->
137-
Tls_miou.close tls;
137+
Tls_miou_unix.close tls;
138138
go buf tls actions
139139
| Shutdown cmd :: actions ->
140-
Tls_miou.shutdown tls (cmd :> [ `read | `write | `read_write ]);
140+
Tls_miou_unix.shutdown tls (cmd :> [ `read | `write | `read_write ]);
141141
go buf tls actions
142142
| Recv len :: actions ->
143143
let tmp = Bytes.make len '\000' in
144-
Tls_miou.really_read tls tmp;
144+
Tls_miou_unix.really_read tls tmp;
145145
Buffer.add_subbytes buf tmp 0 len;
146146
go buf tls actions
147147
in
148148
let buf = Buffer.create 0x100 in
149149
try go buf tls actions with
150-
| End_of_file | Tls_miou.Closed_by_peer | Tls_miou.Tls_alert _
151-
| Tls_miou.Tls_failure _ ->
152-
inhibit (fun () -> Miou_unix.close (Tls_miou.file_descr tls));
150+
| End_of_file | Tls_miou_unix.Closed_by_peer | Tls_miou_unix.Tls_alert _
151+
| Tls_miou_unix.Tls_failure _ ->
152+
inhibit (fun () -> Miou_unix.close (Tls_miou_unix.file_descr tls));
153153
Buffer.contents buf
154154
| exn ->
155-
inhibit (fun () -> Miou_unix.close (Tls_miou.file_descr tls));
155+
inhibit (fun () -> Miou_unix.close (Tls_miou_unix.file_descr tls));
156156
raise exn
157157

158158
let run_client ~to_client:actions cfg addr =
159159
let domain = Unix.domain_of_sockaddr addr in
160160
let socket = Unix.socket ~cloexec:true domain Unix.SOCK_STREAM 0 in
161161
Unix.connect socket addr;
162162
let fd = Miou_unix.of_file_descr ~non_blocking:true socket in
163-
let tls = Tls_miou.client_of_fd cfg fd in
163+
let tls = Tls_miou_unix.client_of_fd cfg fd in
164164
let finally () =
165-
inhibit (fun () -> Miou_unix.close (Tls_miou.file_descr tls))
165+
inhibit (fun () -> Miou_unix.close (Tls_miou_unix.file_descr tls))
166166
in
167167
Fun.protect ~finally @@ fun () -> run ~role:"client" actions tls
168168

@@ -201,7 +201,7 @@ let run_server ~to_server:actions ~stop fd cfg =
201201
| Ok (fd, _) ->
202202
ignore
203203
( Miou.call_cc ~orphans @@ fun () ->
204-
match Tls_miou.server_of_fd cfg fd with
204+
match Tls_miou_unix.server_of_fd cfg fd with
205205
| tls -> run ~role:"server" actions tls
206206
| exception _ ->
207207
Miou_unix.close fd;
File renamed without changes.
File renamed without changes.

tls-miou.opam renamed to tls-miou-unix.opam

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ depends: [
2626
"ptime" {with-test}
2727
]
2828
tags: [ "org:mirage"]
29-
synopsis: "Transport Layer Security purely in OCaml, Miou layer"
29+
synopsis: "Transport Layer Security purely in OCaml, Miou+Unix layer"
3030
description: """
31-
Tls-miou provides an effectful Tls_miou module to be used with Miou.
31+
Tls-miou provides an effectful Tls_miou module to be used with Miou and Unix.
3232
"""
3333

3434
pin-depends: [

0 commit comments

Comments
 (0)