tls 0.1 → 0.1.1
raw patch · 3 files changed
+16/−11 lines, 3 filesdep ~AESdep ~QuickCheckdep ~RSA
Dependency ranges changed: AES, QuickCheck, RSA, base, bytestring, certificate, cryptocipher, cryptohash, haskell98, mtl, spoon, vector
Files
TODO view
@@ -4,6 +4,7 @@ - implement Certificate Verify / Certificate Request - add Client Certificates - add check for non-self signed certificate+- don't fail straight away if clientkeyxchg failed. required for security - alert correctly on errors - process session as they should - put 4 bytes of time in client/server random
Tests.hs view
@@ -1,11 +1,12 @@ import Text.Printf import Data.Word import Test.QuickCheck-import Test.QuickCheck.Batch+import Test.QuickCheck.Test import Network.TLS.Struct import Network.TLS.Packet import Control.Monad+import System.IO liftM6 f m1 m2 m3 m4 m5 m6 = do { x1 <- m1; x2 <- m2; x3 <- m3; x4 <- m4; x5 <- m5; x6 <- m6; return (f x1 x2 x3 x4 x5 x6) } @@ -73,13 +74,15 @@ decodeHs b = either (Left . id) (\(ty, bdata) -> decodeHandshake TLS10 ty bdata) $ decodeHandshakeHeader b {- main -}-options = TestOptions- { no_of_tests = 2000- , length_of_tests = 1- , debug_tests = False }+args = Args+ { replay = Nothing+ , maxSuccess = 500+ , maxDiscard = 2000+ , maxSize = 500+ } +run_test n t = putStr (" " ++ n ++ " ... ") >> hFlush stdout >> quickCheckWith args t+ main = do- runTests "marshalling=id" options- [ run prop_header_marshalling_id- , run prop_handshake_marshalling_id- ]+ run_test "marshalling header = id" prop_header_marshalling_id+ run_test "marshalling handshake = id" prop_handshake_marshalling_id
tls.cabal view
@@ -1,5 +1,5 @@ Name: tls-Version: 0.1+Version: 0.1.1 Description: Implementation of the TLS protocol, focusing on purity and more type-checking. .@@ -32,6 +32,7 @@ binary >= 0.5, bytestring, vector,+ haskell98, AES, RSA, spoon, cryptocipher, certificate >= 0.2@@ -62,7 +63,7 @@ Main-is: Tests.hs if flag(test) Buildable: True- Build-Depends: base >= 3 && < 5, HUnit, QuickCheck, bytestring, haskell98+ Build-Depends: base >= 3 && < 5, HUnit, QuickCheck >= 2 && < 2.3, bytestring, haskell98 else Buildable: False