diff options
author | James Crayne <jim.crayne@gmail.com> | 2018-05-29 02:03:41 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2018-05-29 02:03:41 +0000 |
commit | efc45ad4c240529913e4f7d4f0c9f880cba6c0f9 (patch) | |
tree | 3abd53a933a6dd068a77f18d80623b314c1ecdbc /src/Network/Tox | |
parent | 4728116433ddd449dc4c654847ed2f35a38605db (diff) |
Show instance for SymmetricKey, more debug prints
Diffstat (limited to 'src/Network/Tox')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 1 | ||||
-rw-r--r-- | src/Network/Tox/DHT/Handlers.hs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 2902685c..5a52450b 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -545,6 +545,7 @@ cryptoNetHandler sessions addr (NetHandshake (Handshake (Cookie n24 ecookie) non | |||
545 | seckeys <- map fst <$> atomically (readTVar (userKeys crypto)) | 545 | seckeys <- map fst <$> atomically (readTVar (userKeys crypto)) |
546 | symkey <- atomically $ transportSymmetric crypto | 546 | symkey <- atomically $ transportSymmetric crypto |
547 | now <- getPOSIXTime | 547 | now <- getPOSIXTime |
548 | hPutStrLn stderr ("Decrypt cookie with n24=" ++ show n24 ++ "\n symkey= " ++ show symkey) | ||
548 | lr <- fmap join . sequence $ do -- Either Monad | 549 | lr <- fmap join . sequence $ do -- Either Monad |
549 | -- TODO: XXX: FIXME: | 550 | -- TODO: XXX: FIXME: |
550 | -- The following call to decryptSymmetric is failing every time, | 551 | -- The following call to decryptSymmetric is failing every time, |
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs index 327659a9..42937b89 100644 --- a/src/Network/Tox/DHT/Handlers.hs +++ b/src/Network/Tox/DHT/Handlers.hs | |||
@@ -231,6 +231,7 @@ createCookie crypto ni remoteUserKey = do | |||
231 | , dhtKey = transportPublic crypto | 231 | , dhtKey = transportPublic crypto |
232 | } | 232 | } |
233 | edta = encryptSymmetric sym n24 dta | 233 | edta = encryptSymmetric sym n24 dta |
234 | hPutStrLn stderr $ "Created cookie with n24 = 0x" ++ show n24 ++ "\n sym=" ++ show sym | ||
234 | return $ Cookie n24 edta | 235 | return $ Cookie n24 edta |
235 | 236 | ||
236 | cookieRequestH :: TransportCrypto -> NodeInfo -> CookieRequest -> IO Cookie | 237 | cookieRequestH :: TransportCrypto -> NodeInfo -> CookieRequest -> IO Cookie |