From: Sergey Matveev Date: Sat, 12 Aug 2023 12:09:52 +0000 (+0300) Subject: bytes.Equal instead of bytes.Compare X-Git-Tag: v0.4.0~2 X-Git-Url: http://www.git.stargrave.org/?p=tofuproxy.git;a=commitdiff_plain;h=30ca001954a6edb76248a38ffbd58a2ebfda0964 bytes.Equal instead of bytes.Compare --- diff --git a/tls/verify.go b/tls/verify.go index b8b515a..2df0c24 100644 --- a/tls/verify.go +++ b/tls/verify.go @@ -239,7 +239,7 @@ HostIsNotRestricted: caches.AcceptedM.Lock() caches.Accepted[host] = certTheirHash caches.AcceptedM.Unlock() - if bytes.Compare(certsOur[0].Raw, rawCerts[0]) != 0 { + if !bytes.Equal(certsOur[0].Raw, rawCerts[0]) { fifos.LogCert <- fmt.Sprintf("Refresh\t%s\t%s", host, certTheirHash) goto CertUpdate }