on master help sign in
adding defaultTlsSettings.
commit0f7f362d92e419bd982b01e9f98a5e5ec392cfd8 authorKazu Yamamoto <kazu@iij.ad.jp> dateTue 21 May 2013, 17:37 (13 years ago) parent37ac234
1 file changed+7−1
warp-tls/Network/Wai/Handler/WarpTLS.hs+7−1
warp-tls/Network/Wai/Handler/WarpTLS.hs+7−1
@@ -12,6 +12,7 @@ module Network.Wai.Handler.WarpTLS
1212 , onInsecure
1313 , tlsLogging
1414 , OnInsecure (..)
15+ , defaultTlsSettings
1516 , tlsSettings
1617 , runTLS
1718 , runTLSSocket
@@ -67,9 +68,14 @@ data OnInsecure = DenyInsecure L.ByteString
6768tlsSettings :: FilePath -- ^ Certificate file
6869 -> FilePath -- ^ key file
6970 -> TLSSettings
70−tlsSettings cert key = TLSSettings
71+tlsSettings cert key = defaultTlsSettings
7172 { certFile = cert
7273 , keyFile = key
74+ }
75+
76+defaultTlsSettings = TLSSettings
77+ { certFile = "certificate.pem"
78+ , keyFile = "key.pem"
7379 , onInsecure = DenyInsecure "This server only accepts secure HTTPS connections."
7480 , tlsLogging = TLS.defaultLogging
7581 }