From 57ff75437ba23b29f3397c0f5ed00944b759f35f Mon Sep 17 00:00:00 2001 From: James Crayne Date: Mon, 28 May 2018 06:13:05 +0000 Subject: netcrypto wip, compiles --- src/Network/Tox/Crypto/Handlers.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Network/Tox/Crypto') 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 data NetCryptoSession = NCrypto { ncState :: TVar NetCryptoSessionStatus + , ncMyPublicKey :: PublicKey , ncSessionId :: SessionID , ncTheirPublicKey :: PublicKey -- Tox id w/o nospam , ncTheirBaseNonce :: TVar Nonce24 -- base nonce + packet number @@ -339,6 +340,7 @@ freshCryptoSession sessions pktoq <- atomically $ PQ.newOutGoing pktq ncToWire toWireIO 0 (outboundQueueCapacity sessions) 0 let netCryptoSession0 = NCrypto { ncState = ncState0 + , ncMyPublicKey = toPublic key , ncSessionId = sessionId , ncTheirPublicKey = remotePublicKey , ncTheirBaseNonce = ncTheirBaseNonce0 -- cgit v1.2.3