From 51b0dd5258a7cf0a3e3e532dbbe957c900613b52 Mon Sep 17 00:00:00 2001 From: raul Date: Tue, 14 May 2024 09:07:00 +0200 Subject: [PATCH] Implement clientside TLS --- cmd/clientFunc.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/clientFunc.go b/cmd/clientFunc.go index 1da0934..73d67f2 100644 --- a/cmd/clientFunc.go +++ b/cmd/clientFunc.go @@ -6,6 +6,7 @@ package cmd import ( "bufio" + "crypto/tls" "fmt" "io" "log" @@ -42,7 +43,11 @@ var ( ) 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 { log.Fatalf("Error occurred trying to connect to server: %v\n", err) }