diff --git a/Examples/Stunnel.hs b/Examples/Stunnel.hs
--- a/Examples/Stunnel.hs
+++ b/Examples/Stunnel.hs
@@ -125,6 +125,7 @@
 		, destination     :: String
 		, sourceType      :: String
 		, source          :: String
+		, debug           :: Bool
 		, validCert       :: Bool }
 	| Server
 		{ destinationType :: String
@@ -140,6 +141,7 @@
 	, destination     = "localhost:6061"  &= help "destination address influenced by destination type" &= typ "ADDRESS"
 	, sourceType      = "tcp"             &= help "type of source (tcp, unix, fd)" &= typ "SOURCETYPE"
 	, source          = "localhost:6060"  &= help "source address influenced by source type" &= typ "ADDRESS"
+	, debug           = False             &= help "debug the TLS protocol printing debugging to stdout" &= typ "Bool"
 	, validCert       = False             &= help "check if the certificate receive is valid" &= typ "Bool"
 	}
 	&= help "connect to a remote destination that use SSL/TLS"
@@ -208,12 +210,18 @@
 	srcaddr <- getAddressDescription (sourceType pargs) (source pargs)
 	dstaddr <- getAddressDescription (destinationType pargs) (destination pargs)
 
+	let logging = if not $ debug pargs then defaultLogging else defaultLogging
+		{ loggingPacketSent = putStrLn . ("debug: send: " ++)
+		, loggingPacketRecv = putStrLn . ("debug: recv: " ++)
+		}
+
 	let crecv = if validCert pargs then certificateVerifyChain else (\_ -> return True)
 	let clientstate = defaultParams
 		{ pConnectVersion = TLS10
 		, pAllowedVersions = [ TLS10, TLS11 ]
 		, pCiphers = ciphers
 		, pCertificates = []
+		, pLogging = logging
 		, onCertificatesRecv = crecv
 		}
 
@@ -260,5 +268,5 @@
 main = do
 	x <- cmdArgsRun mode
 	case x of
-		Client _ _ _ _ _   -> doClient x
+		Client _ _ _ _ _ _ -> doClient x
 		Server _ _ _ _ _ _ -> doServer x
diff --git a/tls-extra.cabal b/tls-extra.cabal
--- a/tls-extra.cabal
+++ b/tls-extra.cabal
@@ -1,5 +1,5 @@
 Name:                tls-extra
-Version:             0.2.0
+Version:             0.2.1
 Description:
    a set of extra definitions, default values and helpers for tls.
 License:             BSD3
@@ -28,7 +28,7 @@
 
 Library
   Build-Depends:     base > 3 && < 5
-                   , tls >= 0.6 && < 0.7
+                   , tls >= 0.6.2 && < 0.7
                    , mtl
                    , network >= 2.3
                    , cryptohash >= 0.6
