Add an unix implementation of TLS#518
Conversation
|
I have a PoC PR using this in ocamldap: kit-ty-kate/ocamldap#10 |
|
Thanks for this PR. Sorry for the delayed reply. There are some mentions of "miou" in the tls_unix.ml which should be renamed. I wonder whether @dinosaure (with #443) has an opinion whether to go that way or this way here to move forward!?
I'm a bit puzzled what you mean. From my session ( let null ?ip:_ ~host:_ _certs = Ok None;;
let fd = Tls_unix.connect null ("robur.coop", 443);;
Tls_unix.write fd "GET / HTTP/1.0\r\nHost: robur.coop\r\n\r\n";;
Tls_unix.read fd buf;;Somehow, the But does the |
|
About the PR, seems fine but I need to take a deep look and test it to see if we did miss anything.
Depending on the size of the buffer you give. Do you have a reproducible example? |
I meant that |
|
@kit-ty-kate for common operations (i.e. public web, let's encrypt certificates, ...), https://ocaml.org/p/ca-certs/latest/doc/ca-certs/Ca_certs/index.html#val-authenticator should be a sensible thing to use. |
same as above, my buf is a Bytes.create 4094. read returns around 2700 bytes if i recall correctly. |
|
ok, so I tested this PR on FreeBSD. I'm eager to merge and cut a release. If we find issues, we can fix them and cut new releases. A |
|
Don't have strong opinion about that, I just need to keep into my mind that if we find a bug on |
Indeed, I put a comment in both ml files. |
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 is an updated version of #443 rebased on top of master.
I then took the current
tls-miouimplementation and replacedMiou_unixbyUnix