Implement clientside TLS
This commit is contained in:
parent
0f33d13d6a
commit
51b0dd5258
|
@ -6,6 +6,7 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
|
@ -42,7 +43,11 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Client() {
|
func Client() {
|
||||||
conn, err := net.Dial("tcp", serverIP+":"+serverPort)
|
//conn, err := net.Dial("tcp", serverIP+":"+serverPort)
|
||||||
|
conf := &tls.Config{
|
||||||
|
InsecureSkipVerify: true,
|
||||||
|
}
|
||||||
|
conn, err := tls.Dial("tcp", serverIP+":"+serverPort, conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Error occurred trying to connect to server: %v\n", err)
|
log.Fatalf("Error occurred trying to connect to server: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue