-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: main
Are you sure you want to change the base?
Conversation
instead of storing functions in the server and client state
There was a problem hiding this 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 ())) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ())) |
There was a problem hiding this comment.
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 ())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well.
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)