From 04db12a77fc0afa7759b97499d7e1264af22799a Mon Sep 17 00:00:00 2001 From: Joren Schipman Date: Sat, 4 May 2024 01:02:40 +0200 Subject: [PATCH] Change exchange messages --- rsaserver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rsaserver.go b/rsaserver.go index df1c9cc..8e13831 100644 --- a/rsaserver.go +++ b/rsaserver.go @@ -74,7 +74,7 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) { log.Printf("Error decrypting key: %v", err) return } - conn.Write([]byte("Received key\n")) + conn.Write([]byte("OK\n")) ivData, err := bufio.NewReader(conn).ReadString('\n') if err != nil { @@ -86,7 +86,7 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) { log.Printf("Error decrypting IV: %v", err) return } - conn.Write([]byte("Received IV\n")) + conn.Write([]byte("OK\n")) uidData, err := bufio.NewReader(conn).ReadString('\n') if err != nil { @@ -98,7 +98,7 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) { log.Printf("Error decrypting UID: %v", err) return } - conn.Write([]byte("Received UID\n")) + conn.Write([]byte("OK\n")) fmt.Println("Exchange, OK!")