-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | extend happstack-server with https:// support (TLS/SSL) -- -- extend happstack-server with https: support (TLS/SSL) @package happstack-server-tls @version 7.0.2 -- | module Happstack.Server.Internal.TimeoutSocketTLS sPutLazyTickle :: Handle -> SSL -> ByteString -> IO () sPutTickle :: Handle -> SSL -> ByteString -> IO () sGetContents :: Handle -> SSL -> IO ByteString timeoutSocketIO :: Handle -> Socket -> SSL -> TimeoutIO sendFileTickle :: Handle -> SSL -> FilePath -> Offset -> ByteCount -> IO () -- | core functions and types for HTTPS support module Happstack.Server.Internal.TLS -- | wrapper around logM for this module log' :: Priority -> String -> IO () -- | configuration for using https:// data TLSConf TLSConf :: Int -> FilePath -> FilePath -> Int -> Maybe (LogAccess UTCTime) -> Maybe (Response -> IO Response) -> TLSConf tlsPort :: TLSConf -> Int tlsCert :: TLSConf -> FilePath tlsKey :: TLSConf -> FilePath tlsTimeout :: TLSConf -> Int tlsLogAccess :: TLSConf -> Maybe (LogAccess UTCTime) -- | a function to validate the output on-the-fly tlsValidator :: TLSConf -> Maybe (Response -> IO Response) -- | a partially complete TLSConf . You must sete tlsCert and -- tlsKey at a mininum. nullTLSConf :: TLSConf -- | record that holds the Socket and SSLContext needed to -- start the https:// event loop. Used with -- simpleHTTPWithSocket' -- -- see also: httpOnSocket data HTTPS HTTPS :: Socket -> SSLContext -> HTTPS httpsSocket :: HTTPS -> Socket sslContext :: HTTPS -> SSLContext -- | generate the HTTPS record needed to start the https:// event -- loop httpsOnSocket :: FilePath -> FilePath -> Socket -> IO HTTPS -- | accept a TLS connection acceptTLS :: HTTPS -> IO (Socket, SSL, HostName, PortNumber) -- | https: 'Request'/'Response' loop -- -- This function initializes SSL, and starts accepting and handling -- Requests and sending Respones. -- -- Each Request is processed in a separate thread. listenTLS :: TLSConf -> (Request -> IO Response) -> IO () -- | low-level https: 'Request'/'Response' loop -- -- This is the low-level loop that reads Requests and sends -- Respones. It assumes that SSL has already been initialized -- and that socket is listening. -- -- Each Request is processed in a separate thread. -- -- see also: listenTLS listenTLS' :: Int -> Maybe (LogAccess UTCTime) -> Socket -> HTTPS -> (Request -> IO Response) -> IO () module Happstack.Server.SimpleHTTPS -- | configuration for using https:// data TLSConf TLSConf :: Int -> FilePath -> FilePath -> Int -> Maybe (LogAccess UTCTime) -> Maybe (Response -> IO Response) -> TLSConf tlsPort :: TLSConf -> Int tlsCert :: TLSConf -> FilePath tlsKey :: TLSConf -> FilePath tlsTimeout :: TLSConf -> Int tlsLogAccess :: TLSConf -> Maybe (LogAccess UTCTime) -- | a function to validate the output on-the-fly tlsValidator :: TLSConf -> Maybe (Response -> IO Response) -- | a partially complete TLSConf . You must sete tlsCert and -- tlsKey at a mininum. nullTLSConf :: TLSConf -- | start the https:// server, and handle requests using the supplied -- ServerPart. -- -- This function will not return, though it may throw an exception. simpleHTTPS :: ToMessage a => TLSConf -> ServerPartT IO a -> IO () -- | similar simpleHTTPS but allows you to supply a function to -- convert m to IO. simpleHTTPS' :: (ToMessage b, Monad m, Functor m) => (UnWebT m a -> UnWebT IO b) -> TLSConf -> ServerPartT m a -> IO ()