@@ -16,6 +16,7 @@ module Network.Wai.Handler.WarpTLS (
1616 , tlsAllowedVersions
1717 , tlsCiphers
1818 , tlsWantClientCert
19+ , tlsServerHooks
1920 , defaultTlsSettings
2021 , tlsSettings
2122 , tlsSettingsMemory
@@ -83,6 +84,7 @@ data TLSSettings = TLSSettings {
8384 --
8485 -- Since 1.4.2
8586 , tlsWantClientCert :: Bool
87+ , tlsServerHooks :: TLS.ServerHooks
8688 }
8789
8890-- | Default 'TLSSettings'. Use this to create 'TLSSettings' with the field record name.
@@ -97,6 +99,7 @@ defaultTlsSettings = TLSSettings {
9799 , tlsAllowedVersions = [TLS.TLS10,TLS.TLS11,TLS.TLS12]
98100 , tlsCiphers = ciphers
99101 , tlsWantClientCert = False
102+ , tlsServerHooks = def
100103 }
101104
102105-- taken from stunnel example in tls-extra
@@ -186,6 +189,7 @@ runTLSSocket' tlsset@TLSSettings{..} set credential sock app =
186189 , TLS.serverShared = def {
187190 TLS.sharedCredentials = TLS.Credentials [credential]
188191 }
192+ , TLS.serverHooks = tlsServerHooks
189193 }
190194
191195----------------------------------------------------------------