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

@hannesm
Copy link
Member

hannesm commented Aug 20, 2024

Nearly 3 years later, what should we do with this? I know there (is/was) a similar module in https://github.com/cfcs/ofetch/

@reynir
Copy link
Contributor

reynir commented Aug 22, 2024

With #503 merge I guess this can be closed?

@dinosaure
Copy link
Contributor Author

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.

@reynir
Copy link
Contributor

reynir commented Aug 22, 2024

Ah ok. I was just going off the comment in #503:

#443 rebased with string.

@hannesm
Copy link
Member

hannesm commented Aug 22, 2024

Ah ok. I was just going off the comment in #503:

#443 rebased with string.

Thanks for spotting the typo, it was supposed to read #494 instead of #443 I assume.

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.

3 participants