tls-debug 0.3.3 → 0.3.4
raw patch · 2 files changed
+9/−3 lines, 2 filesdep ~tls
Dependency ranges changed: tls
Files
- src/SimpleClient.hs +7/−1
- tls-debug.cabal +2/−2
src/SimpleClient.hs view
@@ -33,6 +33,7 @@ , cipher_AES256_SHA1 , cipher_RC4_128_MD5 , cipher_RC4_128_SHA1+ , cipher_RSA_3DES_EDE_CBC_SHA1 ] runTLS debug ioDebug params hostname portNumber f = do@@ -99,6 +100,7 @@ | NoVersionDowngrade | UserAgent String | Output String+ | Timeout String | Help deriving (Show,Eq) @@ -109,6 +111,7 @@ , Option [] ["io-debug"] (NoArg IODebug) "TLS IO debug output on stdout" , Option ['s'] ["session"] (NoArg Session) "try to resume a session" , Option ['O'] ["output"] (ReqArg Output "stdout") "output "+ , Option ['t'] ["timeout"] (ReqArg Timeout "timeout") "timeout in milliseconds (2s by default)" , Option [] ["no-validation"] (NoArg NoValidateCert) "disable certificate validation" , Option [] ["http1.1"] (NoArg Http11) "use http1.1 instead of http1.0" , Option [] ["ssl3"] (NoArg Ssl3) "use SSL 3.0"@@ -145,7 +148,7 @@ bye ctx return () loopRecv out ctx = do- d <- timeout 2000000 (recvData ctx) -- 2s per recv+ d <- timeout (timeoutMs * 1000) (recvData ctx) -- 2s per recv case d of Nothing -> when (Debug `elem` flags) (hPutStrLn stderr "timeout") >> return () Just b | BC.null b -> return ()@@ -162,6 +165,9 @@ getOutput = foldl f Nothing flags where f _ (Output o) = Just o f acc _ = acc+ timeoutMs = foldl f 2000 flags+ where f _ (Timeout t) = read t+ f acc _ = acc printUsage = putStrLn $ usageInfo "usage: simpleclient [opts] <hostname> [port]\n\n\t(port default to: 443)\noptions:\n" options
tls-debug.cabal view
@@ -1,5 +1,5 @@ Name: tls-debug-Version: 0.3.3+Version: 0.3.4 Description: A set of program to test and debug various aspect of the TLS package. .@@ -25,7 +25,7 @@ , cprng-aes >= 0.5.0 , data-default-class , crypto-pubkey- , tls >= 1.2 && < 1.3+ , tls >= 1.2.8 && < 1.3 if os(windows) Buildable: False else