[PD1] crypto changes and TLS almost done

This commit is contained in:
Afonso Franco 2024-04-18 17:15:47 +01:00
parent 2c4f1fd2fc
commit 5ae7358a0d
Signed by: afonso
SSH key fingerprint: SHA256:aiLbdlPwXKJS5wMnghdtod0SPy8imZjlVvCyUX9DJNk
13 changed files with 138 additions and 87 deletions

View file

@ -2,7 +2,7 @@ package networking
import (
"crypto/tls"
"net"
"log"
)
@ -17,7 +17,7 @@ type Client[T any] struct {
func NewClient[T any](clientTLSConfigProvider ClientTLSConfigProvider) Client[T] {
dialConn, err := tls.Dial("tcp", "localhost:8080", clientTLSConfigProvider.GetTLSConfigClient())
if err != nil {
panic("Could not open connection to server")
log.Panicln("Could not open connection to server",err)
}
conn := NewConnection[T](dialConn)
return Client[T]{Connection: conn}