]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - tls/verify.go
bytes.Equal instead of bytes.Compare
[tofuproxy.git] / tls / verify.go
index b8b515ae9774faf45191a3b114f86f644fdd51fa..2df0c24e5bcf7bc3984244df2676fae6bab71f72 100644 (file)
@@ -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
                        }