Safe Haskell | None |
---|
HTTP over SSL/TLS support for Warp via the TLS package.
- data TLSSettings
- certFile :: TLSSettings -> FilePath
- keyFile :: TLSSettings -> FilePath
- onInsecure :: TLSSettings -> OnInsecure
- tlsLogging :: TLSSettings -> Logging
- defaultTlsSettings :: TLSSettings
- tlsSettings :: FilePath -> FilePath -> TLSSettings
- data OnInsecure
- runTLS :: TLSSettings -> Settings -> Application -> IO ()
- runTLSSocket :: TLSSettings -> Settings -> Socket -> Application -> IO ()
- data WarpTLSException = InsecureConnectionDenied
Settings
data TLSSettings Source
certFile :: TLSSettings -> FilePathSource
File containing the certificate.
keyFile :: TLSSettings -> FilePathSource
File containing the key
onInsecure :: TLSSettings -> OnInsecureSource
Do we allow insecure connections with this server as well? Default is a simple text response stating that a secure connection is required.
Since 1.4.0
defaultTlsSettings :: TLSSettingsSource
Default TLSSettings
. Use this to create TLSSettings
with the field record name.
:: FilePath | Certificate file |
-> FilePath | Key file |
-> TLSSettings |
A smart constructor for TLSSettings
.
data OnInsecure Source
An action when a plain HTTP comes to HTTP over TLS/SSL port.
Runner
runTLS :: TLSSettings -> Settings -> Application -> IO ()Source
Running Application
with TLSSettings
and Settings
.
runTLSSocket :: TLSSettings -> Settings -> Socket -> Application -> IO ()Source
Running Application
with TLSSettings
and Settings
using
specified Socket
.