RRSIG.Sign: remove duplicate before signing records as per RFC

This commit is contained in:
Filippo Valsorda 2015-03-17 14:34:16 +00:00
parent fd694e564b
commit 315e7334de
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