diff options
author | joe <joe@jerkface.net> | 2018-06-26 04:34:44 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2018-06-26 04:34:44 -0400 |
commit | 187e6a58a7b2a3af3f16dab737c485c886f87917 (patch) | |
tree | cdab81cd38f2ea46c8fc7cc4a7bf50677a3542d3 /src/Network/Tox/Crypto | |
parent | b2e6800535affc9387339bc759dda28d54f38e39 (diff) |
debug prints
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 4d34701a..6f440ea5 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -1083,12 +1083,6 @@ sessionPacketH sessions addrRaw (CryptoPacket nonce16 encrypted) = do | |||
1083 | lr <- fmap join $ sequence $ do -- Either Monad -- | 1083 | lr <- fmap join $ sequence $ do -- Either Monad -- |
1084 | pubkey <- maybeToEither mbpublickey | 1084 | pubkey <- maybeToEither mbpublickey |
1085 | Right $ do -- IO Monad | 1085 | Right $ do -- IO Monad |
1086 | dput XNetCrypto $ "(NetCrypto)sessionPacketH: pubkey = " ++ show (key2id $ pubkey) | ||
1087 | dput XNetCrypto $ "(NetCrypto)sessionPacketH: theirBaseNonce = " ++ show theirBaseNonce | ||
1088 | dput XNetCrypto $ "(NetCrypto)sessionPacketH: tempNonce = " ++ show tempNonce | ||
1089 | ++ " nonce16=" ++ printf "0x%x" nonce16 ++ " last2bytes =" ++ printf "0x%x" (last2Bytes theirBaseNonce) | ||
1090 | dput XNetCrypto $ "(NetCrypto)sessionPacketH: mySession public=" ++ show (key2id $ toPublic ncSessionSecret) | ||
1091 | dput XNetCrypto $ "(NetCrypto)sessionPacketH: theirSession public=" ++ show (key2id $ pubkey) | ||
1092 | secret <- lookupSharedSecret crypto ncSessionSecret pubkey tempNonce | 1086 | secret <- lookupSharedSecret crypto ncSessionSecret pubkey tempNonce |
1093 | let step1 = decrypt secret encrypted | 1087 | let step1 = decrypt secret encrypted |
1094 | case step1 of | 1088 | case step1 of |
@@ -1476,6 +1470,7 @@ handlePacketRequest session (CryptoData { bufferStart=num | |||
1476 | ps <- atomically $ PQ.getRequested getOutGoingParam pktoq num bs | 1470 | ps <- atomically $ PQ.getRequested getOutGoingParam pktoq num bs |
1477 | let resend (Just (n,pkt)) = sendSessionPacket (ncAllSessions session) addr pkt | 1471 | let resend (Just (n,pkt)) = sendSessionPacket (ncAllSessions session) addr pkt |
1478 | resend _ = return () | 1472 | resend _ = return () |
1473 | dput XNetCrypto ("Re-Sending Packets: " ++ show (map fst $ catMaybes ps)) | ||
1479 | mapM_ resend ps | 1474 | mapM_ resend ps |
1480 | _ -> return () | 1475 | _ -> return () |
1481 | 1476 | ||