mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-01 00:57:32 +01:00
Fix unit tests
This commit is contained in:
parent
0b87cc92b6
commit
d80af74300
@ -41,10 +41,11 @@ type Source struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (source *Source) checkSignature(bin, sig []byte) (err error) {
|
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)
|
_, err = source.minisignKey.Verify(bin, signature)
|
||||||
}
|
}
|
||||||
return
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// timeNow can be replaced by tests to provide a static value
|
// timeNow can be replaced by tests to provide a static value
|
||||||
|
Loading…
Reference in New Issue
Block a user