packages feed

tls 1.2.5 → 1.2.6

raw patch · 4 files changed

+27/−5 lines, 4 files

Files

CHANGELOG.md view
@@ -1,3 +1,18 @@+## Version 1.2.6 (23 Mar 2014)++- Fixed socket backend endless loop when the server does not close connection+  properly at the TLS level with the close notify alert.+- Catch Error_EOF in recvData and return empty data.++## Version 1.2.5 (23 Mar 2014)++- Fixed Server key exchange data being parsed without the correct+  context, leading to not knowing how to parse the structure.+  The bug happens on efficient server that happens to send the ServerKeyXchg+  message together with the ServerHello in the same handshake packet.+  This trigger parsing of all the messages without having set the pending cipher.+  Delay parsing, when this happen, until we know what to do with it.+ ## Version 1.2.4 (23 Mar 2014)  - Fixed unrecognized name non-fatal alert after client hello.
Network/TLS/Backend.hs view
@@ -50,7 +50,9 @@               where loop 0    = return []                     loop left = do                         r <- Socket.recv sock left-                        liftM (r:) (loop (left - B.length r))+                        if B.null r+                            then return []+                            else liftM (r:) (loop (left - B.length r))  instance HasBackend Handle where     initializeBackend handle = hSetBuffering handle NoBuffering
Network/TLS/Core.hs view
@@ -72,9 +72,14 @@ recvData :: MonadIO m => Context -> m B.ByteString recvData ctx = liftIO $ do     checkValid ctx-    pkt <- withReadLock ctx $ recvPacket ctx-    either onError process pkt-  where onError err@(Error_Protocol (reason,fatal,desc)) =+    E.catchJust (\Error_EOF -> Just ())+                doRecv+                (\() -> return B.empty)+  where doRecv = do+            pkt <- withReadLock ctx $ recvPacket ctx+            either onError process pkt++        onError err@(Error_Protocol (reason,fatal,desc)) =             terminate err (if fatal then AlertLevel_Fatal else AlertLevel_Warning) desc reason         onError err =             terminate err AlertLevel_Fatal InternalError (show err)
tls.cabal view
@@ -1,5 +1,5 @@ Name:                tls-Version:             1.2.5+Version:             1.2.6 Description:    Native Haskell TLS and SSL protocol implementation for server and client.    .