summaryrefslogtreecommitdiff
path: root/dht
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2020-01-24 22:23:39 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-25 19:18:12 -0500
commitbc93745f7591b3b079d660ca98715911495fceeb (patch)
treec871a6ad1f02ab072d63607f966787908e6fed7d /dht
parentd2e220c86325b55e22409b1a7da12b06a8052e76 (diff)
Use monotonic counter for SecretsCache priority.
Diffstat (limited to 'dht')
-rw-r--r--dht/src/Network/Tox/Handshake.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dht/src/Network/Tox/Handshake.hs b/dht/src/Network/Tox/Handshake.hs
index 40bbbaf3..1ed93d8c 100644
--- a/dht/src/Network/Tox/Handshake.hs
+++ b/dht/src/Network/Tox/Handshake.hs
@@ -120,7 +120,7 @@ encodeHandshake :: POSIXTime
120 -> STM (Handshake Encrypted) 120 -> STM (Handshake Encrypted)
121encodeHandshake timestamp crypto me them otherCookie myhandshakeData = do 121encodeHandshake timestamp crypto me them otherCookie myhandshakeData = do
122 n24 <- transportNewNonce crypto 122 n24 <- transportNewNonce crypto
123 state <- ($ n24) <$> lookupNonceFunctionSTM timestamp crypto me them 123 state <- ($ n24) <$> lookupNonceFunctionSTM crypto me them
124 return Handshake { handshakeCookie = otherCookie 124 return Handshake { handshakeCookie = otherCookie
125 , handshakeNonce = n24 125 , handshakeNonce = n24
126 , handshakeData = encrypt state $ encodePlain myhandshakeData 126 , handshakeData = encrypt state $ encodePlain myhandshakeData