Merge pull request #193 from FiloSottile/uniq_sig

RRSIG.Sign: remove duplicate before signing records as per RFC
This commit is contained in:
Miek Gieben 2015-03-17 15:36:26 +00:00
commit 37500c5a59
1 changed files with 4 additions and 1 deletions

View File

@ -575,7 +575,10 @@ func rawSignatureData(rrset []RR, s *RRSIG) (buf []byte, err error) {
wires[i] = wire
}
sort.Sort(wires)
for _, wire := range wires {
for i, wire := range wires {
if i > 0 && bytes.Equal(wire, wires[i-1]) {
continue
}
buf = append(buf, wire...)
}
return buf, nil