cleanups
This commit is contained in:
parent
310a187f8c
commit
41293d5d4b
6
tsig.go
6
tsig.go
|
@ -115,13 +115,7 @@ func (rr *RR_TSIG) Verify(msg *Msg, secret string) bool {
|
||||||
}
|
}
|
||||||
h := hmac.NewMD5([]byte(rawsecret))
|
h := hmac.NewMD5([]byte(rawsecret))
|
||||||
io.WriteString(h, string(buf))
|
io.WriteString(h, string(buf))
|
||||||
|
|
||||||
bufhex := unpackBase64(h.Sum())
|
|
||||||
fmt.Printf("SUM: %v\n", h.Sum())
|
|
||||||
fmt.Printf("SUM: %X\n", h.Sum())
|
|
||||||
fmt.Printf("SUM: %s %s\n", bufhex, rr.MAC)
|
|
||||||
return string(h.Sum()) == rr.MAC
|
return string(h.Sum()) == rr.MAC
|
||||||
// return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func tsigToBuf(rr *RR_TSIG, msg *Msg) ([]byte, bool) {
|
func tsigToBuf(rr *RR_TSIG, msg *Msg) ([]byte, bool) {
|
||||||
|
|
Loading…
Reference in New Issue