mirror of
https://github.com/fatedier/frp.git
synced 2024-12-13 10:11:04 +01:00
Co-authored-by: Johan Hernefeldt <johan.hernefeldt@moralis.io>
This commit is contained in:
parent
bf635c0e90
commit
eeea7602d9
@ -100,6 +100,8 @@ func NewClientTLSConfig(certPath, keyPath, caPath, serverName string) (*tls.Conf
|
|||||||
base.Certificates = []tls.Certificate{*cert}
|
base.Certificates = []tls.Certificate{*cert}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
base.ServerName = serverName
|
||||||
|
|
||||||
if caPath != "" {
|
if caPath != "" {
|
||||||
pool, err := newCertPool(caPath)
|
pool, err := newCertPool(caPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -107,7 +109,6 @@ func NewClientTLSConfig(certPath, keyPath, caPath, serverName string) (*tls.Conf
|
|||||||
}
|
}
|
||||||
|
|
||||||
base.RootCAs = pool
|
base.RootCAs = pool
|
||||||
base.ServerName = serverName
|
|
||||||
base.InsecureSkipVerify = false
|
base.InsecureSkipVerify = false
|
||||||
} else {
|
} else {
|
||||||
base.InsecureSkipVerify = true
|
base.InsecureSkipVerify = true
|
||||||
|
Loading…
Reference in New Issue
Block a user