Browse Source

switch to bytes.Equal

Darien Raymond 7 years ago
parent
commit
248099eca5
1 changed files with 2 additions and 3 deletions
  1. 2 3
      transport/internet/tls/config_other.go

+ 2 - 3
transport/internet/tls/config_other.go

@@ -3,10 +3,9 @@
 package tls
 
 import (
+	"bytes"
 	"crypto/x509"
 	"sync"
-
-	"v2ray.com/core/common/compare"
 )
 
 type certPoolCache struct {
@@ -18,7 +17,7 @@ type certPoolCache struct {
 
 func (c *certPoolCache) hasCert(cert []byte) bool {
 	for _, xCert := range c.extraCerts {
-		if compare.BytesEqual(xCert, cert) {
+		if bytes.Equal(xCert, cert) {
 			return true
 		}
 	}