From e0035dbd6b90a5be5c3a2b1093b31357b47a6a13 Mon Sep 17 00:00:00 2001 From: Alan Orwick Date: Thu, 5 Oct 2023 15:15:58 -0500 Subject: [PATCH] neuter verify sig on dns lookup --- p2p/dnsdisc/client.go | 5 +---- p2p/dnsdisc/tree.go | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/p2p/dnsdisc/client.go b/p2p/dnsdisc/client.go index 563d6bc262..6c67948dab 100644 --- a/p2p/dnsdisc/client.go +++ b/p2p/dnsdisc/client.go @@ -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. @@ -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 } diff --git a/p2p/dnsdisc/tree.go b/p2p/dnsdisc/tree.go index 34c90d36a6..6461e87ced 100644 --- a/p2p/dnsdisc/tree.go +++ b/p2p/dnsdisc/tree.go @@ -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 }