on master help sign in
Merge branch 'master' of https://github.com/gertcuykens/wai
a43ca50Michael Snoyman
warp-tls/Network/Wai/Handler/WarpTLS.hs+8
@@ -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.
50 --
50 --
51 -- Since 1.4.0
51 -- Since 1.4.0
52+ , tlsLogging :: TLS.Logging
53+ -- ^ The level of logging to turn on.
54+ --
55+ -- Default: 'TLS.defaultLogging'.
56+ --
57+ -- Since 1.4.0
52 }
58 }
53
59
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
64 }
71 }
65
72
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
77 }
85 }
78 runSettingsConnectionMaker set (getter params) app
86 runSettingsConnectionMaker set (getter params) app
79 where
87 where