From d80af74300d5c52c71671f789bfb291dd07884fe Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 20 Mar 2020 22:40:29 +0100 Subject: [PATCH] Fix unit tests --- dnscrypt-proxy/sources.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dnscrypt-proxy/sources.go b/dnscrypt-proxy/sources.go index a28c6860..d3574c8f 100644 --- a/dnscrypt-proxy/sources.go +++ b/dnscrypt-proxy/sources.go @@ -41,10 +41,11 @@ type Source struct { } func (source *Source) checkSignature(bin, sig []byte) (err error) { - if signature, err := minisign.DecodeSignature(string(sig)); err == nil { + var signature minisign.Signature + if signature, err = minisign.DecodeSignature(string(sig)); err == nil { _, err = source.minisignKey.Verify(bin, signature) } - return + return err } // timeNow can be replaced by tests to provide a static value