module Network.TLS.Session (
SessionManager (..),
noSessionManager,
) where
import Network.TLS.Types
data SessionManager = SessionManager
{ SessionManager -> SessionIDorTicket -> IO (Maybe SessionData)
sessionResume :: SessionIDorTicket -> IO (Maybe SessionData)
, SessionManager -> SessionIDorTicket -> IO (Maybe SessionData)
sessionResumeOnlyOnce :: SessionIDorTicket -> IO (Maybe SessionData)
, SessionManager
-> SessionIDorTicket -> SessionData -> IO (Maybe SessionIDorTicket)
sessionEstablish :: SessionID -> SessionData -> IO (Maybe Ticket)
, SessionManager -> SessionIDorTicket -> IO ()
sessionInvalidate :: SessionID -> IO ()
, SessionManager -> Bool
sessionUseTicket :: Bool
}
noSessionManager :: SessionManager
noSessionManager :: SessionManager
noSessionManager =
SessionManager
{ sessionResume :: SessionIDorTicket -> IO (Maybe SessionData)
sessionResume = \SessionIDorTicket
_ -> Maybe SessionData -> IO (Maybe SessionData)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SessionData
forall a. Maybe a
Nothing
, sessionResumeOnlyOnce :: SessionIDorTicket -> IO (Maybe SessionData)
sessionResumeOnlyOnce = \SessionIDorTicket
_ -> Maybe SessionData -> IO (Maybe SessionData)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SessionData
forall a. Maybe a
Nothing
, sessionEstablish :: SessionIDorTicket -> SessionData -> IO (Maybe SessionIDorTicket)
sessionEstablish = \SessionIDorTicket
_ SessionData
_ -> Maybe SessionIDorTicket -> IO (Maybe SessionIDorTicket)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SessionIDorTicket
forall a. Maybe a
Nothing
, sessionInvalidate :: SessionIDorTicket -> IO ()
sessionInvalidate = \SessionIDorTicket
_ -> () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
,
sessionUseTicket :: Bool
sessionUseTicket = Bool
False
}