philtor_ has joined #mirage
tlockney is now known as tlockney_away
philtor_ has quit [Ping timeout: 240 seconds]
philtor has quit [Ping timeout: 250 seconds]
tlockney_away is now known as tlockney
englishm has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
englishm has quit [Remote host closed the connection]
englishm has joined #mirage
tlockney is now known as tlockney_away
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #mirage
englishm has quit [Remote host closed the connection]
_whitelogger_ has joined #mirage
AltGr has joined #mirage
dsheets has joined #mirage
thomasga has joined #mirage
thomasga has quit [Client Quit]
dsheets has quit [Quit: Leaving]
dsheets has joined #mirage
andreas has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
djs55 has joined #mirage
cr409 has joined #mirage
andreas has joined #mirage
djs55 has quit [Quit: Leaving.]
djs55 has joined #mirage
jonludlam has joined #mirage
englishm has quit [Ping timeout: 240 seconds]
englishm has joined #mirage
<vbmithr> Aug 16 00:48:53.8141 (20319|RSM|error) Error in dispatch: Tls_lwt.Tls_failure(19)
<vbmithr> Hi
<vbmithr> I've got this error while using ocaml-tls 
<vbmithr> It seems to be "wrong TLS version" but it cannot be
<vbmithr> since I'm using the same tls at both ends
<vbmithr> Tls.Config.(client ~authenticator ~ciphers:Ciphers.supported ())
<vbmithr> Do I need to specify those extra args ?
<vbmithr> I'm not using authentication
dbuenzli has joined #mirage
dbuenzli has quit [Client Quit]
<vbmithr> weird.
englishm has quit [Quit: Leaving...]
vbmithr_ has joined #mirage
jonludlam has quit [*.net *.split]
vbmithr has quit [*.net *.split]
jonludlam has joined #mirage
<noddy> vbmithr_: could you paste the code for both endpoints somewhere?
<vbmithr_> yes
<vbmithr_> and I have that
<vbmithr_> Pre_sexp.Of_sexp_error(_, _)
<vbmithr_> When trying to print the trace
<vbmithr_> github.com/vbmithr/oraft branch debug
<vbmithr_> sometimes the dispatch function line 391, RSM.ml raises Tls_lwt.Tls_failure(19)
jonludlam has quit [Ping timeout: 260 seconds]
<vbmithr_> the client part is open_tls_connection in oraft_lwt.ml
jonludlam has joined #mirage
<vbmithr_> I'm a bit confused by the close operation
<vbmithr_> maybe it happens when the client closes before the server
<vbmithr_> really not sure
<noddy> hmmmmmmmm
<noddy> why don't you use the close in tls?
<vbmithr_> replace by Tls_lwt.(Unix.client_of_fd ~host:"" tls fd >|= of_t)
<vbmithr_> ?
<vbmithr_> in open_tls_connection
<vbmithr_> I was about to try that
jonludlam has quit [Ping timeout: 260 seconds]
<noddy> although i'm still not sure that's the problem here..
<vbmithr_> I can easily try.
jonludlam has joined #mirage
<noddy> gah, we should have made that exception a string decoded from the underlying alert code. this is ridiculously unhelpful.
<vbmithr_> I don't think there is a point in doing a shutdown immediately succeded by a close anyway
<noddy> the thing is, to close a tls session, you are supposed to signal you are about to close on the tls layer first
<noddy> which is what Tls_lwt.Unix.close does
<noddy> and the channels provided by Tls_lwt
<noddy> ... but i'm still not sure that's the error here
<vbmithr_> When I countWhen I countWhen I countlet of_t t =
<vbmithr_> let open Lwt_io in
<vbmithr_> (make ~close ~mode:Input (Unix.read_bytes t)),
<vbmithr_> let close () = Unix.close t in
<vbmithr_> (make ~close ~mode:Output @@
<vbmithr_> fun a b c -> Unix.write_bytes t a b c >> return c)
<noddy> when you count? :D
<vbmithr_> It was stored in my paste buffer I think :)
<noddy> looks that way :)
<vbmithr_> If I'm not mistaken you just do a standard Unix.close here
<noddy> nononono
<noddy> that Unix is the Unix module *above*, in the same file
<noddy> Tls_lwt.Unix
<vbmithr_> Ha
<noddy> ... which does more magic
<noddy> ok, this is bad
<noddy> the real problem here is that you need your own socket management, and Tls_lwt does not let you both have your own sockets *and* build channels
<vbmithr_> I don't understand
<vbmithr_> :)
<noddy> Tls_lwt.connect does correct magic for you
<noddy> Tls_lwt.Unix.client_of_fd does less magic
<noddy> the matrix is: (channel vs. buffer) * (own socket vs. your socket)
<noddy> and i think the problem is that the api does not cover the fourth case: you socket, our channel lifecycle management.
<noddy> i have to go now
<vbmithr_> sure
<vbmithr_> talk to you later
<noddy> but please, try copy-pasting bits of tls_lwt that build the channel into your code
<vbmithr_> ok.
<noddy> if that solves the problem, i'll rework the api to provide the missing fourth case.
<vbmithr_> ok, will do
<noddy> ttyl
<vbmithr_> It seems I'm doing it all correctly
<vbmithr_> (alert-out (FATAL PROTOCOL_VERSION))
rgrinberg has joined #mirage
philtor has joined #mirage
brson has joined #mirage
andreas has quit [Quit: Leaving.]
andreas has joined #mirage
AltGr has left #mirage [#mirage]
andreas has quit [Quit: Leaving.]
philtor_ has joined #mirage
djs55 has quit [Quit: Leaving.]
philtor_ has quit [Ping timeout: 264 seconds]
tlockney_away is now known as tlockney
dsheets has quit [Ping timeout: 245 seconds]
englishm has joined #mirage
djs55 has joined #mirage
tlockney is now known as tlockney_away
thomasga has joined #mirage
tlockney_away is now known as tlockney
dsheets has joined #mirage
thomasga has quit [Quit: Leaving.]
englishm_ has joined #mirage
englishm has quit [*.net *.split]
tizoc has quit [*.net *.split]
tizoc has joined #mirage
djs55 has quit [Quit: Leaving.]
andreas has joined #mirage
tlockney is now known as tlockney_away
philtor_ has joined #mirage
roarde has joined #mirage
roarde has left #mirage ["Leaving"]
djs55 has joined #mirage
tlockney_away is now known as tlockney
philtor_ has quit [Ping timeout: 245 seconds]
dsheets has quit [Ping timeout: 240 seconds]
djs55 has quit [Quit: Leaving.]
philtor has quit [Ping timeout: 240 seconds]
djs55 has joined #mirage
englishm_ has quit [Remote host closed the connection]
englishm has joined #mirage
philtor_ has joined #mirage
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
tlockney is now known as tlockney_away
djs55 has quit [Quit: Leaving.]
englishm has quit [Remote host closed the connection]
cr409 has quit [Ping timeout: 260 seconds]
brson_ has joined #mirage
tlockney_away is now known as tlockney
brson_ has quit [Client Quit]
brson_ has joined #mirage
brson has quit [Ping timeout: 240 seconds]