packages feed

haal-models-0.1.3.0: src/Haal/Models/TLS/OpenSSLV1V0V2ServerRegular.hs

-- Generated by haal-gen. Do not edit manually.
module Haal.Models.TLS.OpenSSLV1V0V2ServerRegular
    ( OpenSSLV1V0V2ServerRegularInput (..)
    , OpenSSLV1V0V2ServerRegularOutput (..)
    , openSSLV1V0V2ServerRegular
    ) where

import Haal.Automaton.MealyAutomaton (MealyAutomaton, mkMealyAutomatonTable)

data OpenSSLV1V0V2ServerRegularInput
    = In_ApplicationData
    | In_ApplicationDataEmpty
    | In_ChangeCipherSpec
    | In_ClientHelloRSA
    | In_ClientKeyExchange
    | In_EmptyCertificate
    | In_Finished
    deriving (Show, Eq, Ord, Enum, Bounded)

data OpenSSLV1V0V2ServerRegularOutput
    = Out_ConnectionClosed
    | Out_Empty
    | Out_ServerHello___Certificate___ServerHelloDone
    | Out_Alert_Fatal__Unexpected_message____ConnectionClosed
    | Out_ChangeCipherSpec___Finished
    | Out_ApplicationData___ConnectionClosed
    | Out_Alert_Fatal__Handshake_failure____ConnectionClosed
    deriving (Show, Eq, Ord, Enum, Bounded)

{- Transitions (state  input -> next state / output):
    0     In_ApplicationData       -> 1 / Out_ConnectionClosed
          In_ApplicationDataEmpty  -> 2 / Out_Empty
          In_ChangeCipherSpec      -> 1 / Out_Empty
          In_ClientHelloRSA        -> 3 / Out_ServerHello___Certificate___ServerHelloDone
          In_ClientKeyExchange     -> 1 / Out_ConnectionClosed
          In_EmptyCertificate      -> 1 / Out_ConnectionClosed
          In_Finished              -> 1 / Out_ConnectionClosed
    1     In_ApplicationData       -> 1 / Out_ConnectionClosed
          In_ApplicationDataEmpty  -> 1 / Out_ConnectionClosed
          In_ChangeCipherSpec      -> 1 / Out_ConnectionClosed
          In_ClientHelloRSA        -> 1 / Out_ConnectionClosed
          In_ClientKeyExchange     -> 1 / Out_ConnectionClosed
          In_EmptyCertificate      -> 1 / Out_ConnectionClosed
          In_Finished              -> 1 / Out_ConnectionClosed
    2     In_ApplicationData       -> 1 / Out_ConnectionClosed
          In_ApplicationDataEmpty  -> 1 / Out_Empty
          In_ChangeCipherSpec      -> 1 / Out_ConnectionClosed
          In_ClientHelloRSA        -> 1 / Out_ConnectionClosed
          In_ClientKeyExchange     -> 1 / Out_ConnectionClosed
          In_EmptyCertificate      -> 1 / Out_ConnectionClosed
          In_Finished              -> 1 / Out_ConnectionClosed
    3     In_ApplicationData       -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ApplicationDataEmpty  -> 3 / Out_Empty
          In_ChangeCipherSpec      -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ClientHelloRSA        -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ClientKeyExchange     -> 6 / Out_Empty
          In_EmptyCertificate      -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_Finished              -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
    4     In_ApplicationData       -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ApplicationDataEmpty  -> 4 / Out_Empty
          In_ChangeCipherSpec      -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ClientHelloRSA        -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ClientKeyExchange     -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_EmptyCertificate      -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_Finished              -> 5 / Out_ChangeCipherSpec___Finished
    5     In_ApplicationData       -> 1 / Out_ApplicationData___ConnectionClosed
          In_ApplicationDataEmpty  -> 5 / Out_Empty
          In_ChangeCipherSpec      -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ClientHelloRSA        -> 1 / Out_Alert_Fatal__Handshake_failure____ConnectionClosed
          In_ClientKeyExchange     -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_EmptyCertificate      -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_Finished              -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
    6     In_ApplicationData       -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ApplicationDataEmpty  -> 6 / Out_Empty
          In_ChangeCipherSpec      -> 4 / Out_Empty
          In_ClientHelloRSA        -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_ClientKeyExchange     -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_EmptyCertificate      -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
          In_Finished              -> 1 / Out_Alert_Fatal__Unexpected_message____ConnectionClosed
-}
openSSLV1V0V2ServerRegular :: MealyAutomaton Int OpenSSLV1V0V2ServerRegularInput OpenSSLV1V0V2ServerRegularOutput
openSSLV1V0V2ServerRegular =
    case mkMealyAutomatonTable 7 0 deltaTable lambdaTable of
        Right m -> m
        Left err -> error ("haal-gen: invalid transition table: " ++ err)
  where
    deltaTable =
        "\1\2\1\3\1\1\1\
        \\1\1\1\1\1\1\1\
        \\1\1\1\1\1\1\1\
        \\1\3\1\1\6\1\1\
        \\1\4\1\1\1\1\5\
        \\1\5\1\1\1\1\1\
        \\1\6\4\1\1\1\1"
    lambdaTable =
        "\0\1\1\2\0\0\0\
        \\0\0\0\0\0\0\0\
        \\0\1\0\0\0\0\0\
        \\3\1\3\3\1\3\3\
        \\3\1\3\3\3\3\4\
        \\5\1\3\6\3\3\3\
        \\3\1\1\3\3\3\3"