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

Update to less functors #286

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

Update to less functors #286

wants to merge 3 commits into from

Conversation

hannesm
Copy link
Contributor

@hannesm hannesm commented Feb 11, 2025

this updates this package with recent changes (in flight) of mirageos packages. this will need to wait until the dns release is merged (ocaml/opam-repository#27408), and then also the unikernels will need to be updated (which will require a mirage release)

Copy link
Contributor

@reynir reynir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks! :)

@@ -625,7 +619,7 @@ let incoming_control_client config rng session channel now op data =
ca);
X509.Authenticator.chain_of_trust
(* ~allowed_hashes:Mirage_crypto.Hash.hashes *)
~time:(fun () -> Some now)
~time:(fun () -> Some (Mirage_ptime.now ()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we call Mirage_ptime.now () at a later point. I think that's ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, did we have a bug here? Using the same timestamp always doesn't seem right. If the handshake takes sufficiently long I guess we could accept a certificate that just expired (small window of whatever timeout we have). I don't remember the protocol in full, but I don't think we would handshake again with this same authenticator.

@@ -884,7 +878,7 @@ let incoming_control_server auth_user_pass is_not_taken config rng session
Ok
(Some
(X509.Authenticator.chain_of_trust
~time:(fun () -> Some now)
~time:(fun () -> Some (Mirage_ptime.now ()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@@ -896,7 +890,7 @@ let incoming_control_server auth_user_pass is_not_taken config rng session
| Ok _ -> acc
| Error _ ->
X509.Validation.trust_cert_fingerprint
~time:(fun () -> Some now)
~time:(fun () -> Some (Mirage_ptime.now ()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well.

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.

2 participants