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

Perform keyauth hashing in AddDNSOneChallenge, add ACME prefix #8

Open
cpu opened this issue Apr 4, 2019 · 1 comment
Open

Perform keyauth hashing in AddDNSOneChallenge, add ACME prefix #8

cpu opened this issue Apr 4, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@cpu
Copy link
Contributor

cpu commented Apr 4, 2019

Presently the AddDNSOneChallenge function is quite simple and adds the provided content under the provided host:

challtestsrv/dnsone.go

Lines 9 to 15 in 285efd6

// AddDNSOneChallenge adds a TXT record for the given host with the given
// content.
func (s *ChallSrv) AddDNSOneChallenge(host, content string) {
s.challMu.Lock()
defer s.challMu.Unlock()
s.dnsOne[host] = append(s.dnsOne[host], content)
}

That means callers have to add the _acme-challenge. prefix for RFC 8555 DNS-01 challenges to the host themselves. They're also responsible for hashing the key authorization for the content argument.

Since this is a function specifically for DNS-01 it should do more of this work automatically. This is an API breaking change and will need to bump the release accordingly.

@cpu
Copy link
Contributor Author

cpu commented Apr 4, 2019

It would probably be worthwhile to take this as a chance to holistically review the whole API and make similar improvements for TLS-ALPN-01 and HTTP-01 as appropriate. I think there could also be some consistency changes made in naming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant