-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor(client): clean-up dns01 request code #23
Conversation
removed duplicated/unused code, added logs
7e83663
to
af85ef7
Compare
// Construction of the request requires a list of multiaddresses that the peerID is listening on using | ||
// publicly reachable IP addresses. | ||
// | ||
// Sending the request to the DNS server requires performing HTTP PeerID Authentication for the corresponding peerID | ||
func ChallengeRequest(ctx context.Context, baseURL string, challenge string, addrs []multiaddr.Multiaddr) (*http.Request, error) { | ||
func ChallengeRequest(ctx context.Context, registrationURL string, challenge string, addrs []multiaddr.Multiaddr) (*http.Request, error) { |
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.
@lidel the reason why the test is now failing is that you changed the semantics to this function which is the one called by the test (i.e. there is now a 404 here because adding "/v1/_acme-challenge" was removed. So the test needs modification also (e.g. to the changed ChallengeRequest semantics or perhaps to just use SendChallenge now).
It might also be worth considering if both of these functions need exporting or not.
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.
Thanks!
Let's keep them, I feel they may be useful in testing, solving the problem of the same code in 2-3 places, like in was in our case before this PR.
CI green, merging to include in Kubo 0.33.0-rc1 |
main commit with ipshipyard/p2p-forge#23
Client code was really bad when things went wrong. p2p-forge looked like error returned by Let's Encrypt, and we don't want users bothering them with problems caused by our DNS TXT record broker.
e2e_test.go:250: failed to run handshake: signature not set
) must be something obvious, but I don't see it yet. Created chore: go-libp2p@37fbd7 #24 to confirm it is not a problem with my local setup. Ideas welcome.