Change exchange messages
This commit is contained in:
parent
3463cf0481
commit
04db12a77f
@ -74,7 +74,7 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) {
|
|||||||
log.Printf("Error decrypting key: %v", err)
|
log.Printf("Error decrypting key: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
conn.Write([]byte("Received key\n"))
|
conn.Write([]byte("OK\n"))
|
||||||
|
|
||||||
ivData, err := bufio.NewReader(conn).ReadString('\n')
|
ivData, err := bufio.NewReader(conn).ReadString('\n')
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -86,7 +86,7 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) {
|
|||||||
log.Printf("Error decrypting IV: %v", err)
|
log.Printf("Error decrypting IV: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
conn.Write([]byte("Received IV\n"))
|
conn.Write([]byte("OK\n"))
|
||||||
|
|
||||||
uidData, err := bufio.NewReader(conn).ReadString('\n')
|
uidData, err := bufio.NewReader(conn).ReadString('\n')
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -98,7 +98,7 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) {
|
|||||||
log.Printf("Error decrypting UID: %v", err)
|
log.Printf("Error decrypting UID: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
conn.Write([]byte("Received UID\n"))
|
conn.Write([]byte("OK\n"))
|
||||||
|
|
||||||
fmt.Println("Exchange, OK!")
|
fmt.Println("Exchange, OK!")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user