Make it public as TsigGenerateWithProvider and update the docs a little.
And TsigVerifyWithProvider also - tweak those docs also a little.
Signed-off-by: Miek Gieben <miek@miek.nl>
* doc: fix xfr example.
The currently example code has a data race, put in the proper code.
Fixes: #1061
Signed-off-by: Miek Gieben <miek@miek.nl>
* Feedback
Signed-off-by: Miek Gieben <miek@miek.nl>
* Call SetTsig() Msg `r` if q.IsTsig() != nil to enable TSIG on AXFR.
* Add tests for xfr.go
* Fix data race condition setting server.TsigSecret
* Test cleanup: xfr_test.go
* Xfr Test cleanup: use exported `IsDuplicate()`, len(xfrTestData)
* Flatten goroutine inside goroutine in Transfer.In
* Return an error for unknown question types
Previously this would just be silently ignored leaving nothing to close
the returned channel or return an error.
* TSIG name must be presented in canonical form
Update the documentation to make clear that the zonename in the
TsigSecret map must be in canonical form.
* Reference RFC 4034 for canonical form
When the server returns a non succesful rcode, return that to the caller
in stead of the "bad soa" of before. "dns: bad xfr rcode: <RCODE>" is
now returned.
Fixes#467
- This allows a user to call `Dial` before they call `Transfer.In`,
thus specifying the attributes of a [Dialer](https://golang.org/src/net/dial.go?s=5630:5708#L17)
before their AXFR
- Add some docs to Transfer.in to show the functionality
closes#264
The next chunk needs to use the previous MAC
Using this fix, I can successfully verify the signatures of not
only the first but the subsequent envelopes as well.
Patch was proposed by andrewtj in a comment. Kudos !
Export lowlevel function and types so that they may be used.
They higher level Exchange function is still there. ExchangeConn
is gone, because it is not needed.