-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | HTTP over SSL/TLS support for Warp via the TLS package
--   
--   API docs and the README are available at
--   <a>http://www.stackage.org/package/warp-tls</a>.
@package warp-tls
@version 3.0.4.2


-- | HTTP over SSL/TLS support for Warp via the TLS package.
module Network.Wai.Handler.WarpTLS
data TLSSettings

-- | File containing the certificate.
certFile :: TLSSettings -> FilePath

-- | File containing the key
keyFile :: TLSSettings -> FilePath

-- | 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
onInsecure :: TLSSettings -> OnInsecure

-- | The level of logging to turn on.
--   
--   Default: <a>defaultLogging</a>.
--   
--   Since 1.4.0
tlsLogging :: TLSSettings -> Logging

-- | The TLS versions this server accepts.
--   
--   Default: '[TLS.TLS10,TLS.TLS11,TLS.TLS12]'.
--   
--   Since 1.4.2
tlsAllowedVersions :: TLSSettings -> [Version]

-- | The TLS ciphers this server accepts.
--   
--   Default: '[TLSExtra.cipher_AES128_SHA1, TLSExtra.cipher_AES256_SHA1,
--   TLSEtra.cipher_RC4_128_MD5, TLSExtra.cipher_RC4_128_SHA1]'
--   
--   Since 1.4.2
tlsCiphers :: TLSSettings -> [Cipher]

-- | Whether or not to demand a certificate from the client. If this is set
--   to True, you must handle received certificates in a server hook or all
--   connections will fail.
--   
--   Default: False
--   
--   Since 3.0.2
tlsWantClientCert :: TLSSettings -> Bool

-- | The server-side hooks called by the tls package, including actions to
--   take when a client certificate is received. See the <a>Network.TLS</a>
--   module for details.
--   
--   Default: def
--   
--   Since 3.0.2
tlsServerHooks :: TLSSettings -> ServerHooks

-- | Default <a>TLSSettings</a>. Use this to create <a>TLSSettings</a> with
--   the field record name.
defaultTlsSettings :: TLSSettings

-- | A smart constructor for <a>TLSSettings</a>.
tlsSettings :: FilePath -> FilePath -> TLSSettings

-- | A smart constructor for <a>TLSSettings</a>, but uses in-memory
--   representations of the certificate and key
--   
--   Since 3.0.1
tlsSettingsMemory :: ByteString -> ByteString -> TLSSettings

-- | A smart constructor for <a>TLSSettings</a> that allows specifying
--   chain certificates.
--   
--   Since 3.0.3
tlsSettingsChain :: FilePath -> [FilePath] -> FilePath -> TLSSettings

-- | A smart constructor for <a>TLSSettings</a>, but uses in-memory
--   representations of the certificate and key
--   
--   Since 3.0.3
tlsSettingsChainMemory :: ByteString -> [ByteString] -> ByteString -> TLSSettings

-- | An action when a plain HTTP comes to HTTP over TLS/SSL port.
data OnInsecure
DenyInsecure :: ByteString -> OnInsecure
AllowInsecure :: OnInsecure

-- | Running <a>Application</a> with <a>TLSSettings</a> and
--   <a>Settings</a>.
runTLS :: TLSSettings -> Settings -> Application -> IO ()

-- | Running <a>Application</a> with <a>TLSSettings</a> and <a>Settings</a>
--   using specified <a>Socket</a>.
runTLSSocket :: TLSSettings -> Settings -> Socket -> Application -> IO ()
data WarpTLSException
InsecureConnectionDenied :: WarpTLSException
instance Typeable WarpTLSException
instance Show WarpTLSException
instance Exception WarpTLSException
