diff options
author | Linus Nordberg <linus@nordberg.se> | 2022-06-14 21:20:48 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-06-21 19:46:54 +0200 |
commit | 722e48feb2aa85d8cb75069a06024e506367e34f (patch) | |
tree | 26d77f2b6cd73779ab9874693dc92fcafdbc1a3e | |
parent | f28d4c28fc553506e01bee3488eaa772e683194b (diff) |
Can be used to disable DNS checks.
-rw-r--r-- | pkg/dns/dns.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 606ce7b..9cac60e 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -31,6 +31,13 @@ func NewDefaultResolver() Verifier { return &DefaultResolver{} } +type DummyResolver struct { +} + +func NewDummyResolver() Verifier { + return &DummyResolver{} +} + func (dr *DefaultResolver) Verify(ctx context.Context, name string, pub *types.PublicKey) error { if err := validPrefix(name); err != nil { return fmt.Errorf("dns: %s", err) @@ -61,3 +68,7 @@ func validPrefix(name string) error { } return nil } + +func (_ *DummyResolver) Verify(_ context.Context, _ string, _ *types.PublicKey) error { + return nil +} |