Async support#1
Conversation
This reverts commit 0b41d63.
| | `AES_256_CBC_SHA256 | ||
| | `AES_256_CCM | ||
| | `AES_256_GCM_SHA384 | ||
| | `_3DES_EDE_CBC_SHA |
There was a problem hiding this comment.
I noticed this due to the odd type name, and then wondered if we shouldn't be disabling the 3DES ciphers by default due to their insecurity. See here for a discussion about this particular cipher combination and its effective entropy. If most clients in the wild support AES ciphers, then perhaps we can drop the older ones from async-tls.
seliopou
left a comment
There was a problem hiding this comment.
Ok I'm back on review. Sorry it's taken so long.
As a general comment, there are some functions in the tls_async.ml that raise when really they could just return a Deferred.Or_error.t. That would make "exception-raising" behavior of the functions more explicit and is a bit more idiomatic. More coming but I thought I'd point this out as I continue on with more specific comments.
|
As a concrete example of a function that should return |
|
Another piece of general feedback, there are a lot of places where |
| cstruct_to_bigstring buf | ||
| @@ fun buf ~pos ~len -> | ||
| Unix.Syscall_result.Int.ok_or_unix_error_exn ~syscall_name:"read" | ||
| @@ Bigstring.read_assume_fd_is_nonblocking fd buf ~pos ~len |
There was a problem hiding this comment.
Stylistic, but this @@ style is a kindof unreadable.
… we have the same behavior
|
I think, all serious feedbacks was done with the second pass (with more explicit commits). At the end, stylistic issue can be fixed and |
|
And if all are happy with this impl. it could be a gift for Christmas? |
upgrade to opam2
this fixes interoperability with (at least) android 4.4 devices
lib: do not require the list of ciphersuites sent by the client to be a proper set
previously, if handle_tls returned a response to the peer, write was called, which may error out (recording it's error in the state and Lwt.fail). the received data was never returned to the caller. now, similar to the semantics in tls_mirage, the error from write is only recorded in the state, and returned on the next function call (write/..).
this ensures proper Lwt_io interoperability, esp. if an Eof has been received, which in the TLS world is replied to with a close_notify alert -- this write can certainly fail. earlier, this resulted in an `Error state, now the `Eof state is retained and Lwt_io can read all application data.
| Fpath.pp path Error.pp err ; | ||
| [] ) | ||
|
|
||
| let authenticator meth = |
There was a problem hiding this comment.
- Is there a reason that
nownot just calledtimeso it can be applied with~timeinstead of~time:now? - This reads the current time and does time conversion for all cases, including
`No_authenticationwhere it's not needed.
ping @dinosaure
There was a problem hiding this comment.
Hmmhmm, for sure we can update time to be unit -> Ptime.t and call it then.
No description provided.