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