TSIG document
This commit is contained in:
parent
dc16392734
commit
061d292118
15
tsig.go
15
tsig.go
|
@ -4,19 +4,20 @@
|
|||
// Basic use pattern when querying with TSIG:
|
||||
//
|
||||
// m := new(Msg)
|
||||
// m.SetAxfr("miek.nl.")
|
||||
// // Add a stub TSIG record.
|
||||
// c := NewClient()
|
||||
// m.SetQuestion("miek.nl.", TypeMX)
|
||||
// // Set the secret under the name "axfr."
|
||||
// c.TsigSecret["axfr."] = "so6ZGir4GPAqINNh9U5c3A==" // don't forget the . here
|
||||
// // Add the stub TSIG RR to the message
|
||||
// m.SetTsig("axfr.", HmacMD5, 300, uint64(time.Seconds()))
|
||||
// // Generate the contents of the complete TSIG record.
|
||||
// TsigGenerate(m, "so6ZGir4GPAqINNh9U5c3A==", "", false)
|
||||
// // A map holds all the secrets
|
||||
// secrets := make(map[string]string)
|
||||
// secrets["axfr."] = "so6ZGir4GPAqINNh9U5c3A==" // don't forget the . here
|
||||
// ...
|
||||
// // When sending the TSIG RR is calculated automatically and filled in
|
||||
//
|
||||
// The secrets' map index is set to 'axfr.'. This must match the ownername of the
|
||||
// TSIG record, which in the above example, is also set to 'axfr.' The supported algorithm
|
||||
// include: HmacMD5, HmacSHA1 and HmacSHA256.
|
||||
//
|
||||
// AXFR
|
||||
// The message requesting an AXFR (almost all TSIG usage is when requesting zone transfers)
|
||||
// for miek.nl with the TSIG record added is now ready to use.
|
||||
// We now need a new client with access to the secrets:
|
||||
|
|
Loading…
Reference in New Issue