Add an unix implementation of TLS using Unix.file_descr#443
Add an unix implementation of TLS using Unix.file_descr#443dinosaure wants to merge 2 commits intomirleft:mainfrom
Unix.file_descr#443Conversation
|
An other possibility is to abstract the underlying flow such as: type 'flow Tls_unix.flow
type 'flow fully_write = 'flow -> string -> int -> int -> unit
type 'flow read = 'flow -> [ `Data of string | `Eof ]
val client_of_flow : fully_write:'flow fully_write -> read:'flow read -> Tls.Config.client -> ?host:[ `host ] Domain_name.t ->
'flow -> ('flow flow, error) result |
|
Nearly 3 years later, what should we do with this? I know there (is/was) a similar module in https://github.com/cfcs/ofetch/ |
|
With #503 merge I guess this can be closed? |
It's more to do with the Unix module only. I don't have a problem with keeping this PR open: it's just that I've found myself several times having to make this module for different cases in which I didn't want to use a scheduler. Maybe the best thing (if you're not a maniac about open PRs) is to leave this PR open as an example. |
|
Would it be possible to update this PR? I'm willing to test it as an early adopter by replacing ssl by tls.unix in ocamldap as mentioned in #517 |
|
thanks a lot, superseeded by #518 |
CHANGES: * Provide an implementation which uses the Unix module (distributed with OCaml), based on the miou-unix implementation (mirleft/ocaml-tls#518 mirleft/ocaml-tls#443 @kit-ty-kate @dinosaure, fixes mirleft/ocaml-tls#517)
This PR is a draft because I missed
key_updateandreneg. Currently, the implementation followstls-mirageas much as possible and the diff between them is smaller as I can. The resulted interface followsMirage_flow.Swithout'a Lwt.tto smoothly use it into some others MirageOS projects (such ascolombeordns).key_updaterenegclient_of_flowshould do theconnect