rfc2136: ensure algorithm is fully qualified (#1259)

The RFC specifies the algorithm to be fully-qualified,
but the CLI docs don't communicate this to the end user.
This commit is contained in:
Dominik Menke 2020-09-27 21:32:10 +02:00 committed by GitHub
parent 77aef9deb5
commit c3ca7d2c6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -181,7 +181,9 @@ func (d *DNSProvider) changeRecord(action, fqdn, value string, ttl int) error {
// TSIG authentication / msg signing // TSIG authentication / msg signing
if len(d.config.TSIGKey) > 0 && len(d.config.TSIGSecret) > 0 { if len(d.config.TSIGKey) > 0 && len(d.config.TSIGSecret) > 0 {
m.SetTsig(dns.Fqdn(d.config.TSIGKey), d.config.TSIGAlgorithm, 300, time.Now().Unix()) key := 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} c.TsigSecret = map[string]string{dns.Fqdn(d.config.TSIGKey): d.config.TSIGSecret}
} }