repair loggin
This commit is contained in:
parent
d76ae2efa3
commit
72eb1d10f1
1 changed files with 9 additions and 8 deletions
|
@ -93,9 +93,6 @@ arbitraryPairParams = do
|
||||||
secNeg <- arbitrary
|
secNeg <- arbitrary
|
||||||
|
|
||||||
|
|
||||||
-- , pLogging = logging "server: "
|
|
||||||
-- , pLogging = logging "client: "
|
|
||||||
|
|
||||||
let serverState = def
|
let serverState = def
|
||||||
{ serverSupported = def { supportedCiphers = serverCiphers
|
{ serverSupported = def { supportedCiphers = serverCiphers
|
||||||
, supportedVersions = serAllowedVersions
|
, supportedVersions = serAllowedVersions
|
||||||
|
@ -117,11 +114,6 @@ arbitraryPairParams = do
|
||||||
}
|
}
|
||||||
return (clientState, serverState)
|
return (clientState, serverState)
|
||||||
where
|
where
|
||||||
logging pre =
|
|
||||||
if debug
|
|
||||||
then def { loggingPacketSent = putStrLn . ((pre ++ ">> ") ++)
|
|
||||||
, loggingPacketRecv = putStrLn . ((pre ++ "<< ") ++) }
|
|
||||||
else def
|
|
||||||
arbitraryCiphers = resize (length knownCiphers + 1) $ listOf1 (elements knownCiphers)
|
arbitraryCiphers = resize (length knownCiphers + 1) $ listOf1 (elements knownCiphers)
|
||||||
|
|
||||||
setPairParamsSessionManager :: SessionManager -> (ClientParams, ServerParams) -> (ClientParams, ServerParams)
|
setPairParamsSessionManager :: SessionManager -> (ClientParams, ServerParams) -> (ClientParams, ServerParams)
|
||||||
|
@ -146,7 +138,16 @@ newPairContext pipe (cParams, sParams) = do
|
||||||
cCtx' <- contextNew cBackend cParams cRNG
|
cCtx' <- contextNew cBackend cParams cRNG
|
||||||
sCtx' <- contextNew sBackend sParams sRNG
|
sCtx' <- contextNew sBackend sParams sRNG
|
||||||
|
|
||||||
|
contextHookSetLogging cCtx' (logging "client: ")
|
||||||
|
contextHookSetLogging sCtx' (logging "server: ")
|
||||||
|
|
||||||
return (cCtx', sCtx')
|
return (cCtx', sCtx')
|
||||||
|
where
|
||||||
|
logging pre =
|
||||||
|
if debug
|
||||||
|
then def { loggingPacketSent = putStrLn . ((pre ++ ">> ") ++)
|
||||||
|
, loggingPacketRecv = putStrLn . ((pre ++ "<< ") ++) }
|
||||||
|
else def
|
||||||
|
|
||||||
establishDataPipe params tlsServer tlsClient = do
|
establishDataPipe params tlsServer tlsClient = do
|
||||||
-- initial setup
|
-- initial setup
|
||||||
|
|
Loading…
Reference in a new issue