diff options
author | joe <joe@jerkface.net> | 2017-10-28 17:05:42 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-10-28 17:05:42 -0400 |
commit | e89145df011e7737c59a1ce4568432e2e9291871 (patch) | |
tree | 11c76e5d76ecca70393063d1a70cc25fba4097af /src/Network/Tox.hs | |
parent | 63f0543e28ac2e73adb4676c36a6fa0b9b7c9d35 (diff) |
New "cookie" command for tox command-line interface.
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r-- | src/Network/Tox.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index e9220fcb..d434360f 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -112,6 +112,7 @@ newCrypto = do | |||
112 | drg0 <- getSystemDRG | 112 | drg0 <- getSystemDRG |
113 | return $ randomBytesGenerate 32 drg0 :: IO (ByteString, SystemDRG) | 113 | return $ randomBytesGenerate 32 drg0 :: IO (ByteString, SystemDRG) |
114 | noncevar <- atomically $ newTVar $ fst $ withDRG drg drgNew | 114 | noncevar <- atomically $ newTVar $ fst $ withDRG drg drgNew |
115 | cookieKeys <- atomically $ newTVar [] | ||
115 | hPutStrLn stderr $ "secret(tox) = " ++ DHT.showHex secret | 116 | hPutStrLn stderr $ "secret(tox) = " ++ DHT.showHex secret |
116 | hPutStrLn stderr $ "public(tox) = " ++ DHT.showHex pubkey | 117 | hPutStrLn stderr $ "public(tox) = " ++ DHT.showHex pubkey |
117 | hPutStrLn stderr $ "symmetric(tox) = " ++ DHT.showHex symkey | 118 | hPutStrLn stderr $ "symmetric(tox) = " ++ DHT.showHex symkey |
@@ -129,6 +130,7 @@ newCrypto = do | |||
129 | writeTVar noncevar drg2 | 130 | writeTVar noncevar drg2 |
130 | return nonce | 131 | return nonce |
131 | , userKeys = ukeys | 132 | , userKeys = ukeys |
133 | , pendingCookies = cookieKeys | ||
132 | } | 134 | } |
133 | 135 | ||
134 | updateIP :: TVar (R.BucketList NodeInfo) -> SockAddr -> STM () | 136 | updateIP :: TVar (R.BucketList NodeInfo) -> SockAddr -> STM () |