Remove HmacMD5 from the documention (#1255)
* Remove HmacMD5 from the documention The aglo is deprecated. Signed-off-by: Miek Gieben <miek@miek.nl> * bump to sha256 Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
83b388a80c
commit
88913150f0
10
doc.go
10
doc.go
|
@ -159,7 +159,7 @@ shows the options you have and what functions to call.
|
||||||
TRANSACTION SIGNATURE
|
TRANSACTION SIGNATURE
|
||||||
|
|
||||||
An TSIG or transaction signature adds a HMAC TSIG record to each message sent.
|
An TSIG or transaction signature adds a HMAC TSIG record to each message sent.
|
||||||
The supported algorithms include: HmacMD5, HmacSHA1, HmacSHA256 and HmacSHA512.
|
The supported algorithms include: HmacSHA1, HmacSHA256 and HmacSHA512.
|
||||||
|
|
||||||
Basic use pattern when querying with a TSIG name "axfr." (note that these key names
|
Basic use pattern when querying with a TSIG name "axfr." (note that these key names
|
||||||
must be fully qualified - as they are domain names) and the base64 secret
|
must be fully qualified - as they are domain names) and the base64 secret
|
||||||
|
@ -174,7 +174,7 @@ changes to the RRset after calling SetTsig() the signature will be incorrect.
|
||||||
c.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="}
|
c.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="}
|
||||||
m := new(dns.Msg)
|
m := new(dns.Msg)
|
||||||
m.SetQuestion("miek.nl.", dns.TypeMX)
|
m.SetQuestion("miek.nl.", dns.TypeMX)
|
||||||
m.SetTsig("axfr.", dns.HmacMD5, 300, time.Now().Unix())
|
m.SetTsig("axfr.", dns.HmacSHA256, 300, time.Now().Unix())
|
||||||
...
|
...
|
||||||
// When sending the TSIG RR is calculated and filled in before sending
|
// When sending the TSIG RR is calculated and filled in before sending
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ request an AXFR for miek.nl. with TSIG key named "axfr." and secret
|
||||||
m := new(dns.Msg)
|
m := new(dns.Msg)
|
||||||
t.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="}
|
t.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="}
|
||||||
m.SetAxfr("miek.nl.")
|
m.SetAxfr("miek.nl.")
|
||||||
m.SetTsig("axfr.", dns.HmacMD5, 300, time.Now().Unix())
|
m.SetTsig("axfr.", dns.HmacSHA256, 300, time.Now().Unix())
|
||||||
c, err := t.In(m, "176.58.119.54:53")
|
c, err := t.In(m, "176.58.119.54:53")
|
||||||
for r := range c { ... }
|
for r := range c { ... }
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ client must be configured with an implementation of the TsigProvider interface:
|
||||||
c.TsigProvider = new(Provider)
|
c.TsigProvider = new(Provider)
|
||||||
m := new(dns.Msg)
|
m := new(dns.Msg)
|
||||||
m.SetQuestion("miek.nl.", dns.TypeMX)
|
m.SetQuestion("miek.nl.", dns.TypeMX)
|
||||||
m.SetTsig(keyname, dns.HmacSHA1, 300, time.Now().Unix())
|
m.SetTsig(keyname, dns.HmacSHA256, 300, time.Now().Unix())
|
||||||
...
|
...
|
||||||
// TSIG RR is calculated by calling your Generate method
|
// TSIG RR is calculated by calling your Generate method
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ Basic use pattern validating and replying to a message that has TSIG set.
|
||||||
if r.IsTsig() != nil {
|
if r.IsTsig() != nil {
|
||||||
if w.TsigStatus() == nil {
|
if w.TsigStatus() == nil {
|
||||||
// *Msg r has an TSIG record and it was validated
|
// *Msg r has an TSIG record and it was validated
|
||||||
m.SetTsig("axfr.", dns.HmacMD5, 300, time.Now().Unix())
|
m.SetTsig("axfr.", dns.HmacSHA256, 300, time.Now().Unix())
|
||||||
} else {
|
} else {
|
||||||
// *Msg r has an TSIG records and it was not validated
|
// *Msg r has an TSIG records and it was not validated
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue