Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an unix implementation of TLS using Unix.file_descr #443

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dinosaure
Copy link
Contributor

@dinosaure dinosaure commented Dec 30, 2021

This PR is a draft because I missed key_update and reneg. Currently, the implementation follows tls-mirage as much as possible and the diff between them is smaller as I can. The resulted interface follows Mirage_flow.S without 'a Lwt.t to smoothly use it into some others MirageOS projects (such as colombe or dns).

  • key_update
  • reneg
  • client_of_flow should do the connect

@dinosaure dinosaure marked this pull request as ready for review January 3, 2022 17:00
@dinosaure
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant