module Network.TLS.Handshake.Control (
ClientState(..)
, ServerState(..)
, EarlySecretInfo(..)
, HandshakeSecretInfo(..)
, ApplicationSecretInfo(..)
, NegotiatedProtocol
) where
import Network.TLS.Cipher
import Network.TLS.Imports
import Network.TLS.Struct
import Network.TLS.Types
type NegotiatedProtocol = ByteString
data EarlySecretInfo = EarlySecretInfo Cipher (ClientTrafficSecret EarlySecret)
deriving Int -> EarlySecretInfo -> ShowS
[EarlySecretInfo] -> ShowS
EarlySecretInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EarlySecretInfo] -> ShowS
$cshowList :: [EarlySecretInfo] -> ShowS
show :: EarlySecretInfo -> String
$cshow :: EarlySecretInfo -> String
showsPrec :: Int -> EarlySecretInfo -> ShowS
$cshowsPrec :: Int -> EarlySecretInfo -> ShowS
Show
data HandshakeSecretInfo = HandshakeSecretInfo Cipher (TrafficSecrets HandshakeSecret)
deriving Int -> HandshakeSecretInfo -> ShowS
[HandshakeSecretInfo] -> ShowS
HandshakeSecretInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HandshakeSecretInfo] -> ShowS
$cshowList :: [HandshakeSecretInfo] -> ShowS
show :: HandshakeSecretInfo -> String
$cshow :: HandshakeSecretInfo -> String
showsPrec :: Int -> HandshakeSecretInfo -> ShowS
$cshowsPrec :: Int -> HandshakeSecretInfo -> ShowS
Show
newtype ApplicationSecretInfo = ApplicationSecretInfo (TrafficSecrets ApplicationSecret)
deriving Int -> ApplicationSecretInfo -> ShowS
[ApplicationSecretInfo] -> ShowS
ApplicationSecretInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationSecretInfo] -> ShowS
$cshowList :: [ApplicationSecretInfo] -> ShowS
show :: ApplicationSecretInfo -> String
$cshow :: ApplicationSecretInfo -> String
showsPrec :: Int -> ApplicationSecretInfo -> ShowS
$cshowsPrec :: Int -> ApplicationSecretInfo -> ShowS
Show
data ClientState =
SendClientHello (Maybe EarlySecretInfo)
| RecvServerHello HandshakeSecretInfo
| SendClientFinished [ExtensionRaw] ApplicationSecretInfo
data ServerState =
SendServerHello [ExtensionRaw] (Maybe EarlySecretInfo) HandshakeSecretInfo
| SendServerFinished ApplicationSecretInfo