Skip to content

Commit

Permalink
neuter verify sig on dns lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
alanorwick committed Oct 6, 2023
1 parent 2d53347 commit e0035db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions p2p/dnsdisc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type Config struct {
RateLimit float64 // maximum DNS requests / second (default 3)
ValidSchemes enr.IdentityScheme // acceptable ENR identity schemes (default enode.ValidSchemes)
Resolver Resolver // the DNS resolver to use (defaults to system DNS)
Logger *log.Logger // destination of client log messages (defaults to root logger)
Logger *log.Logger // destination of client log messages (defaults to root logger)
}

// Resolver is a DNS resolver that can query TXT records.
Expand Down Expand Up @@ -158,9 +158,6 @@ func parseAndVerifyRoot(txt string, loc *linkEntry) (rootEntry, error) {
if err != nil {
return e, err
}
if !e.verifySignature(loc.pubkey) {
return e, entryError{typ: "root", err: errInvalidSig}
}
return e, nil
}

Expand Down
3 changes: 0 additions & 3 deletions p2p/dnsdisc/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ func (t *Tree) SetSignature(pubkey *ecdsa.PublicKey, signature string) error {
}
root := *t.root
root.sig = sig
if !root.verifySignature(pubkey) {
return errInvalidSig
}
t.root = &root
return nil
}
Expand Down

0 comments on commit e0035db

Please sign in to comment.