warp-tls-1.4.1.4: HTTP over SSL/TLS support for Warp via the TLS package

Safe Haskell | None

Network.Wai.Handler.WarpTLS

Contents

- Settings
- Runner
- Exception

Description

HTTP over SSL/TLS support for Warp via the TLS package.

Synopsis

- data TLSSettings
- certFile :: TLSSettings -> FilePath
- keyFile :: TLSSettings -> FilePath
- onInsecure :: TLSSettings -> OnInsecure
- tlsLogging :: TLSSettings -> Logging
- defaultTlsSettings :: TLSSettings
- tlsSettings :: FilePath -> FilePath -> TLSSettings
- data OnInsecure
  - = DenyInsecure ByteString
  - | AllowInsecure
- runTLS :: TLSSettings -> Settings -> Application -> IO ()
- runTLSSocket :: TLSSettings -> Settings -> Socket -> Application -> IO ()
- data WarpTLSException = InsecureConnectionDenied

# Settings

data TLSSettings Source

certFile :: TLSSettings -> FilePath Source

File containing the certificate.

keyFile :: TLSSettings -> FilePath Source

File containing the key

onInsecure :: TLSSettings -> OnInsecure Source

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

tlsLogging :: TLSSettings -> Logging Source

The level of logging to turn on.

Default: `defaultLogging`.

Since 1.4.0

defaultTlsSettings :: TLSSettings Source

Default `TLSSettings`. Use this to create `TLSSettings` with the field record name.

tlsSettings Source

Arguments

:: 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.

Constructors

DenyInsecure ByteString |
AllowInsecure |

# 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`.

# Exception

data WarpTLSException Source

Constructors

InsecureConnectionDenied |

Instances

Show WarpTLSException |
Typeable WarpTLSException |
Exception WarpTLSException |