packages feed

tls 1.3.0 → 1.3.1

raw patch · 5 files changed

+19/−5 lines, 5 files

Files

CHANGELOG.md view
@@ -1,3 +1,11 @@+## Version 1.3.1++- Repair DHE RSA handling on the cipher by creating signature properly++## Version 1.3.0++- modernize the crypto stack by using cryptonite.+ ## Version 1.2.18  - add more tests (network, local)
Network/TLS/Handshake/Signature.hs view
@@ -94,7 +94,11 @@ signatureCreate :: Context -> Maybe HashAndSignatureAlgorithm -> CertVerifyData -> IO DigitallySigned signatureCreate ctx malg (hashAlg, toSign) = do     cc <- usingState_ ctx $ isClientContext-    DigitallySigned malg <$> signRSA ctx cc hashAlg toSign+    let signData =+            case (malg, hashAlg) of+                (Nothing, SHA1_MD5) -> hashFinal $ hashUpdate (hashInit SHA1_MD5) toSign+                _                   -> toSign+    DigitallySigned malg <$> signRSA ctx cc hashAlg signData  signatureVerify :: Context -> DigitallySigned -> SignatureAlgorithm -> Bytes -> IO Bool signatureVerify ctx digSig@(DigitallySigned hashSigAlg _) sigAlgExpected toVerifyData = do
Tests/Connection.hs view
@@ -35,7 +35,7 @@         , bulkBlockSize = 16         , bulkF         = BulkBlockF $ \_ _ _ -> (\m -> (m, B.empty))         }-    , cipherHash = MD5+    , cipherHash        = MD5     , cipherKeyExchange = CipherKeyExchange_RSA     , cipherMinVer      = Nothing     }
Tests/Tests.hs view
@@ -21,6 +21,8 @@  import Data.IORef +import System.Timeout+ prop_pipe_work :: PropertyM IO () prop_pipe_work = do     pipe <- run newPipe@@ -48,9 +50,9 @@     d <- B.pack <$> pick (someWords8 256)     run $ writeChan startQueue d     -- receive it-    dres <- run $ readChan resultQueue+    dres <- run $ timeout 10000000 $ readChan resultQueue     -- check if it equal-    d `assertEq` dres+    Just d `assertEq` dres     return ()  prop_handshake_initiate :: PropertyM IO ()
tls.cabal view
@@ -1,5 +1,5 @@ Name:                tls-Version:             1.3.0+Version:             1.3.1 Description:    Native Haskell TLS and SSL protocol implementation for server and client.    .