diff options
author | James Crayne <jim.crayne@gmail.com> | 2018-06-08 11:31:11 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2018-06-08 11:31:11 +0000 |
commit | fa15dabe75703516c7bbb54fdba2a13ae6c6e9cc (patch) | |
tree | fab0573420c5cdbcefbc95fc0612e77ef0fbd482 | |
parent | cb6bf999a6a2fcafa5ebfa4a26a5154d04bbe8d7 (diff) |
check basenonce matches on handshake
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index f59809fd..e22388a3 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -724,8 +724,8 @@ updateCryptoSession sessions addr newsession timestamp hp session handshake = do | |||
724 | dmsg (" ncTheirDHTKey=" ++ show (ncTheirDHTKey session) | 724 | dmsg (" ncTheirDHTKey=" ++ show (ncTheirDHTKey session) |
725 | ++ bool "{/=}" "{==}" (ncTheirDHTKey session == HaveDHTKey (hpCookieRemoteDhtkey hp)) | 725 | ++ bool "{/=}" "{==}" (ncTheirDHTKey session == HaveDHTKey (hpCookieRemoteDhtkey hp)) |
726 | ++ "hpCookieRemoteDhtkey=" ++ show (hpCookieRemoteDhtkey hp)) | 726 | ++ "hpCookieRemoteDhtkey=" ++ show (hpCookieRemoteDhtkey hp)) |
727 | if ( -- Just ncTheirBaseNonce0 /= hpTheirBaseNonce hp -- XXX: Do we really want to compare base nonce here? | 727 | if ( toMaybe ncTheirBaseNonce0 /= hpTheirBaseNonce hp |
728 | -- || | 728 | || |
729 | ncTheirDHTKey session /= HaveDHTKey (hpCookieRemoteDhtkey hp) | 729 | ncTheirDHTKey session /= HaveDHTKey (hpCookieRemoteDhtkey hp) |
730 | ) | 730 | ) |
731 | then freshCryptoSession sessions addr newsession timestamp hp | 731 | then freshCryptoSession sessions addr newsession timestamp hp |