mirror of
https://github.com/miekg/dns.git
synced 2025-08-12 12:36:58 +02:00
Remove/fix some todo
This commit is contained in:
parent
3ebacbaac8
commit
bfc928973f
@ -277,7 +277,8 @@ func (s *RR_RRSIG) Sign(k PrivateKey, rrset []RR) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verify validates an RRSet with the signature and key. This is only the
|
// Verify validates an RRSet with the signature and key. This is only the
|
||||||
// cryptographic test, the signature validity period most be checked separately.
|
// cryptographic test, the signature validity period must be checked separately.
|
||||||
|
// This function (temporary) modifies the RR for the validation to work.
|
||||||
func (s *RR_RRSIG) Verify(k *RR_DNSKEY, rrset []RR) error {
|
func (s *RR_RRSIG) Verify(k *RR_DNSKEY, rrset []RR) error {
|
||||||
// Frist the easy checks
|
// Frist the easy checks
|
||||||
if s.KeyTag != k.KeyTag() {
|
if s.KeyTag != k.KeyTag() {
|
||||||
@ -482,7 +483,8 @@ func (p wireSlice) Less(i, j int) bool {
|
|||||||
}
|
}
|
||||||
func (p wireSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
func (p wireSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||||
|
|
||||||
// Return the raw signature data.
|
// Return the raw signature data. The data in []RR is modified in
|
||||||
|
// this function.
|
||||||
func rawSignatureData(rrset []RR, s *RR_RRSIG) (buf []byte) {
|
func rawSignatureData(rrset []RR, s *RR_RRSIG) (buf []byte) {
|
||||||
wires := make(wireSlice, len(rrset))
|
wires := make(wireSlice, len(rrset))
|
||||||
for i, r := range rrset {
|
for i, r := range rrset {
|
||||||
@ -505,7 +507,7 @@ func rawSignatureData(rrset []RR, s *RR_RRSIG) (buf []byte) {
|
|||||||
if !ok1 {
|
if !ok1 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
h.Ttl = ttl // restore the order in the universe TODO(mg) work on copy
|
h.Ttl = ttl // restore the order in the universe
|
||||||
wire = wire[:off]
|
wire = wire[:off]
|
||||||
h.Name = name
|
h.Name = name
|
||||||
wires[i] = wire
|
wires[i] = wire
|
||||||
|
Loading…
Reference in New Issue
Block a user