summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/Protocol.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/Protocol.hs b/src/Network/Protocol.hs
index 554d93c..054c0fb 100644
--- a/src/Network/Protocol.hs
+++ b/src/Network/Protocol.hs
@@ -223,7 +223,7 @@ processIncomming gs@GlobalState {..} = do
Just (b, enc)
| b .&. 0xE0 == 0x80 -> do
ch <- maybe (throwError "unexpected encrypted packet") return mbch
- dec <- channelDecrypt ch enc
+ (dec, _) <- channelDecrypt ch enc
case B.uncons dec of
Just (0x00, content) -> do
@@ -297,7 +297,7 @@ processOutgoing gs@GlobalState {..} = do
mbs <- case mbch of
Just ch -> do
runExceptT (channelEncrypt ch $ BL.toStrict $ 0x00 `BL.cons` plain) >>= \case
- Right ctext -> return $ Just $ 0x80 `B.cons` ctext
+ Right (ctext, _) -> return $ Just $ 0x80 `B.cons` ctext
Left err -> do atomically $ gLog $ "Failed to encrypt data: " ++ err
return Nothing
Nothing | secure -> return Nothing