remove ServerName from tls.Config
This commit is contained in:
parent
0dfe50052e
commit
c127b19d5a
|
@ -29,7 +29,9 @@ func main() {
|
|||
log.Fatalf("client: failed to parse root certificate")
|
||||
}
|
||||
|
||||
config := &tls.Config{RootCAs: roots, ServerName: host}
|
||||
config := &tls.Config{
|
||||
RootCAs: roots,
|
||||
}
|
||||
conn, err := tls.Dial("tcp", fmt.Sprintf("%s:%d", host, port), config)
|
||||
if err != nil {
|
||||
log.Fatalf("client: dial: %s", err)
|
||||
|
|
Loading…
Reference in New Issue
Block a user