summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2018-05-28 06:13:05 +0000
committerJames Crayne <jim.crayne@gmail.com>2018-05-28 06:13:05 +0000
commit57ff75437ba23b29f3397c0f5ed00944b759f35f (patch)
tree3d78e3b2d090b865371a78c10a44d40f11f8c36e /src/Network/Tox/Crypto
parent5a1f5550a9135894993cf323ca4970f7c8470991 (diff)
netcrypto wip, compiles
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index cca8b899..bffb4280 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -85,6 +85,7 @@ type SessionID = Word64
85 85
86data NetCryptoSession = NCrypto 86data NetCryptoSession = NCrypto
87 { ncState :: TVar NetCryptoSessionStatus 87 { ncState :: TVar NetCryptoSessionStatus
88 , ncMyPublicKey :: PublicKey
88 , ncSessionId :: SessionID 89 , ncSessionId :: SessionID
89 , ncTheirPublicKey :: PublicKey -- Tox id w/o nospam 90 , ncTheirPublicKey :: PublicKey -- Tox id w/o nospam
90 , ncTheirBaseNonce :: TVar Nonce24 -- base nonce + packet number 91 , ncTheirBaseNonce :: TVar Nonce24 -- base nonce + packet number
@@ -339,6 +340,7 @@ freshCryptoSession sessions
339 pktoq <- atomically $ PQ.newOutGoing pktq ncToWire toWireIO 0 (outboundQueueCapacity sessions) 0 340 pktoq <- atomically $ PQ.newOutGoing pktq ncToWire toWireIO 0 (outboundQueueCapacity sessions) 0
340 let netCryptoSession0 = 341 let netCryptoSession0 =
341 NCrypto { ncState = ncState0 342 NCrypto { ncState = ncState0
343 , ncMyPublicKey = toPublic key
342 , ncSessionId = sessionId 344 , ncSessionId = sessionId
343 , ncTheirPublicKey = remotePublicKey 345 , ncTheirPublicKey = remotePublicKey
344 , ncTheirBaseNonce = ncTheirBaseNonce0 346 , ncTheirBaseNonce = ncTheirBaseNonce0