Conversation
Contributor
Author
|
This last PR modifies some of the changes introduced by the previous one, because of an unexpected bug in miekg/dns library resulting in the fact that that TCP listener cannot be used (this was not known when making the previous PR). |
Member
I'd propose reversing the behaviour so the default is --same-key, because this is what normally happens in register and enable an option for specifying another key. Thoughts? |
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.
Changes
Added a --same-key flag to sig0lease-client (main/cmd/sig0lease-client/main.go) for both register and refresh. When passed, it builds the KEY RR straight from the already-loaded signing key (factored out into a shared keyRRFromClientKey helper, reused by the existing additional-section logic) and adds it to the Update section — so the same key no longer needs to be retyped as a full rr-spec string.
Added --tcp (bare boolean, same style as --same-key) to register/refresh/register-tamper and verify. extractTCPFlag/queryProtocol pick "tcp" vs the default "udp", both client.New(...) call sites now use it, and help text/usage lines were updated (including fixing verify's doc, which listed a stale unused second positional arg).
Testing the client over TCP revealed a bug in handling TCP connections in miekg/dns
Added TCP functionality to the test script: