From 3b250d1058a91cb66dccffcc0b24f795f08d5117 Mon Sep 17 00:00:00 2001 From: Joren Schipman Date: Thu, 2 May 2024 17:09:47 +0200 Subject: [PATCH] Good enough --- rsaserver.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rsaserver.go b/rsaserver.go index 9ab8c4b..df1c9cc 100644 --- a/rsaserver.go +++ b/rsaserver.go @@ -102,7 +102,6 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) { fmt.Println("Exchange, OK!") - // Receive and handle multiple files for { var chunks []string for { @@ -120,12 +119,11 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) { conn.Write([]byte("Received and decrypted chunk\n")) } - go decryptAndHandle(chunks, key, iv, uid) - + conn.Write([]byte("Received and decrypted\n")) - // Check if there are more files to receive + moreFiles, err := bufio.NewReader(conn).ReadString('\n') if err != nil { log.Printf("Error reading more files signal: %v", err)