mirror of
https://github.com/go-acme/lego.git
synced 2024-12-22 07:12:22 +02:00
rfc2136: fix TSIG secret (#1633)
This commit is contained in:
parent
3694559777
commit
5228f6dbcf
2
Makefile
2
Makefile
@ -20,7 +20,7 @@ clean:
|
||||
|
||||
build: clean
|
||||
@echo Version: $(VERSION)
|
||||
go build -v -trimpath -ldflags '-X "main.version=${VERSION}"' -o ${BIN_OUTPUT} ${MAIN_DIRECTORY}
|
||||
go build -trimpath -ldflags '-X "main.version=${VERSION}"' -o ${BIN_OUTPUT} ${MAIN_DIRECTORY}
|
||||
|
||||
image:
|
||||
@echo Version: $(VERSION)
|
||||
|
@ -180,10 +180,13 @@ func (d *DNSProvider) changeRecord(action, fqdn, value string, ttl int) error {
|
||||
|
||||
// TSIG authentication / msg signing
|
||||
if len(d.config.TSIGKey) > 0 && len(d.config.TSIGSecret) > 0 {
|
||||
key := dns.Fqdn(d.config.TSIGKey)
|
||||
key := strings.ToLower(dns.Fqdn(d.config.TSIGKey))
|
||||
alg := dns.Fqdn(d.config.TSIGAlgorithm)
|
||||
m.SetTsig(key, alg, 300, time.Now().Unix())
|
||||
c.TsigSecret = map[string]string{dns.Fqdn(d.config.TSIGKey): d.config.TSIGSecret}
|
||||
|
||||
// secret(s) for Tsig map[<zonename>]<base64 secret>,
|
||||
// zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2)
|
||||
c.TsigSecret = map[string]string{key: d.config.TSIGSecret}
|
||||
}
|
||||
|
||||
// Send the query
|
||||
|
Loading…
Reference in New Issue
Block a user