@@ -49,6 +49,12 @@ data TLSSettings = TLSSettings
49 -- is a simple text response stating that a secure connection is required.
49 -- is a simple text response stating that a secure connection is required.
51 -- Since 1.4.0
51 -- Since 1.4.0
52+ , tlsLogging :: TLS.Logging
53+ -- ^ The level of logging to turn on.
55+ -- Default: 'TLS.defaultLogging'.
54data OnInsecure = DenyInsecure L.ByteString
60data OnInsecure = DenyInsecure L.ByteString
@@ -61,6 +67,7 @@ tlsSettings cert key = TLSSettings
61 { certFile = cert
67 { certFile = cert
62 , keyFile = key
68 , keyFile = key
63 , onInsecure = DenyInsecure "This server only accepts secure HTTPS connections."
69 , onInsecure = DenyInsecure "This server only accepts secure HTTPS connections."
70+ , tlsLogging = TLS.defaultLogging
66runTLSSocket :: TLSSettings -> Settings -> Socket -> Application -> IO ()
73runTLSSocket :: TLSSettings -> Settings -> Socket -> Application -> IO ()
@@ -74,6 +81,7 @@ runTLSSocket TLSSettings {..} set sock app = do
74 { TLS.pAllowedVersions = [TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]
81 { TLS.pAllowedVersions = [TLS.SSL3,TLS.TLS10,TLS.TLS11,TLS.TLS12]
75 , TLS.pCiphers = ciphers
82 , TLS.pCiphers = ciphers
76 , TLS.pCertificates = zip certs $ (Just pk):repeat Nothing
83 , TLS.pCertificates = zip certs $ (Just pk):repeat Nothing
84+ , TLS.pLogging = tlsLogging
78 runSettingsConnectionMaker set (getter params) app
86 runSettingsConnectionMaker set (getter params) app