summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2018-06-16 02:27:21 +0000
committerJames Crayne <jim.crayne@gmail.com>2018-06-16 02:27:32 +0000
commitb384cd2e1a806c882359d0cf619e6cce04784d58 (patch)
tree1092c1f6992216202b91f325597aaad31ee5f695 /src/Network
parent6e50379635c26ba050ae66d9d60ebc38b0a3aa8c (diff)
CookieData should contain remote keys only
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/Tox/DHT/Handlers.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs
index 091374f5..57fc1d57 100644
--- a/src/Network/Tox/DHT/Handlers.hs
+++ b/src/Network/Tox/DHT/Handlers.hs
@@ -268,7 +268,7 @@ createCookie crypto ni remoteUserKey = do
268 let dta = encodePlain $ CookieData 268 let dta = encodePlain $ CookieData
269 { cookieTime = timestamp 269 { cookieTime = timestamp
270 , longTermKey = remoteUserKey 270 , longTermKey = remoteUserKey
271 , dhtKey = transportPublic crypto 271 , dhtKey = id2key $ nodeId ni -- transportPublic crypto
272 } 272 }
273 edta = encryptSymmetric sym n24 dta 273 edta = encryptSymmetric sym n24 dta
274 dput XNetCrypto $ "Created cookie with n24 = 0x" ++ show n24 ++ "\n sym=" ++ show sym 274 dput XNetCrypto $ "Created cookie with n24 = 0x" ++ show n24 ++ "\n sym=" ++ show sym
@@ -285,7 +285,7 @@ createCookieSTM now crypto ni remoteUserKey = do
285 let dta = encodePlain $ CookieData 285 let dta = encodePlain $ CookieData
286 { cookieTime = timestamp 286 { cookieTime = timestamp
287 , longTermKey = remoteUserKey 287 , longTermKey = remoteUserKey
288 , dhtKey = transportPublic crypto 288 , dhtKey = id2key $ nodeId ni -- transportPublic crypto
289 } 289 }
290 edta = encryptSymmetric sym n24 dta 290 edta = encryptSymmetric sym n24 dta
291 dmsg $ "(createCookieSTM) Created cookie with n24 = 0x" ++ show n24 ++ "\n sym=" ++ show sym 291 dmsg $ "(createCookieSTM) Created cookie with n24 = 0x" ++ show n24 ++ "\n sym=" ++ show sym