add smoke-test client and standalone KE server for chrony interop#557
Open
sofiascalzo wants to merge 1 commit into
Open
add smoke-test client and standalone KE server for chrony interop#557sofiascalzo wants to merge 1 commit into
sofiascalzo wants to merge 1 commit into
Conversation
Summary: Adds two dev/test binaries under `time/ntp/ntske/cmd/` to exercise the NTS-KE server end-to-end. `ntsketest` is a smoke-test client: it dials the KE server over TLS 1.3 with ALPN `ntske/1`, sends a NextProtocol=NTPv4 + AEAD `[30, 17]` + `RecordCompliant128GCMExport` request, parses the response, and prints `[ke] PASS: next-proto=NTPv4 aead=<id> cookies=<n>`. Flags: `--addr`, `--ca` (trust a self-signed dev cert), `--skip-ntp` (stop after the KE handshake, since the NTPv4 phase is not implemented yet), and `--timeout`. It mirrors the server's unexported record reader because the `ntske` package exposes no reader-based helper, and re-uses the exported `MarshalRecords`/`Parse` and record constructors. `ntskeserver` is a thin standalone server: it loads a cert/key with `tls.LoadX509KeyPair`, builds an `InMemoryKeystore`, and runs `ntske.Server.ListenAndServe` until SIGINT/SIGTERM. It is the counterpart the `ntsketest` client and `chronyd` connect to for local interop testing. Reviewed By: leoleovich Differential Revision: D111491705
Contributor
|
@sofiascalzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111491705. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Adds two dev/test binaries under
time/ntp/ntske/cmd/to exercise the NTS-KE server end-to-end.ntsketestis a smoke-test client: it dials the KE server over TLS 1.3 with ALPNntske/1, sends a NextProtocol=NTPv4 + AEAD[30, 17]+RecordCompliant128GCMExportrequest, parses the response, and prints[ke] PASS: next-proto=NTPv4 aead=<id> cookies=<n>. Flags:--addr,--ca(trust a self-signed dev cert),--skip-ntp(stop after the KE handshake, since the NTPv4 phase is not implemented yet), and--timeout. It mirrors the server's unexported record reader because thentskepackage exposes no reader-based helper, and re-uses the exportedMarshalRecords/Parseand record constructors.ntskeserveris a thin standalone server: it loads a cert/key withtls.LoadX509KeyPair, builds anInMemoryKeystore, and runsntske.Server.ListenAndServeuntil SIGINT/SIGTERM. It is the counterpart thentsketestclient andchronydconnect to for local interop testing.Reviewed By: leoleovich
Differential Revision: D111491705