Module ocs_eap_ttls_fsm

This gen_fsm behaviour callback module implements the functions associated with a TTLS server within EAP Tunneled Transport Layer Security (EAP-TTLS) in the ocs application.

Copyright © 2016 - 2026 SigScale Global Inc.

Behaviours: gen_fsm.

References

Description

This gen_fsm behaviour callback module implements the functions associated with a TTLS server within EAP Tunneled Transport Layer Security (EAP-TTLS) in the ocs application.

Data Types

statedata()

statedata() = #statedata{sup = pid(), aaah_fsm = undefined | pid(), server_address = inet:ip_address(), server_port = pos_integer(), client_address = undefined | inet:ip_address(), client_port = undefined | pos_integer(), session_id = binary() | {NAS::inet:ip_address() | string(), Port::string(), Peer::string()}, secret = undefined | secret | binary(), eap_id = byte(), start = #radius{code = byte(), id = byte(), authenticator = binary() | [byte()], attributes = binary() | radius_attributes:attributes()} | #diameter_eap_app_DER{}, radius_fsm = undefined | pid(), radius_id = undefined | byte(), req_auth = undefined | [byte()], ssl_socket = undefined | ssl:sslsocket(), socket_options = undefined | [ssl:ssl_option()], max_size = undefined | pos_integer(), rx_length = undefined | pos_integer(), rx_buf = binary(), tx_buf = binary(), ssl_pid = undefined | pid(), client_rand = undefined | binary(), server_rand = undefined | binary(), tls_key = string(), tls_cert = string(), tls_cacert = string(), app_id = undefined | integer(), auth_req_type = undefined | integer(), origin_host = undefined | binary(), origin_realm = undefined | binary(), port_server = undefined | pid(), password_required = boolean(), trusted = boolean(), service_type = undefined | integer()}

Function Index

init/1Initialize the ocs_eap_ttls_fsm finite state machine.
ssl_start/2Handle events sent with gen_fsm:send_event/2 in the ssl_start state.
eap_start/2Handle events sent with gen_fsm:send_event/2 in the eap_start state.
client_hello/2Handle events sent with gen_fsm:send_event/2 in the client_hello state.
server_hello/2Handle events sent with gen_fsm:send_event/2 in the server_hello state.
client_cipher/2Handle events sent with gen_fsm:send_event/2 in the client_cipher state.
server_cipher/2Handle events sent with gen_fsm:send_event/2 in the server_cipher state.
finish/2Handle events sent with gen_fsm:send_event/2 in the finish state.
client_passthrough/2Handle events sent with gen_fsm:send_event/2 in the client_passthrough state.
server_passthrough/2Handle events sent with gen_fsm:send_event/2 in the server_passthrough state.
handle_event/3Handle an event sent with gen_fsm:send_all_state_event/2.
handle_sync_event/4Handle an event sent with gen_fsm:sync_send_all_state_event/2,3.
handle_info/3Handle a received message.
terminate/3Cleanup and exit.
code_change/4Update internal state data during a release upgrade/downgrade.
encrypt_key/4*Encrypt the Pairwise Master Key (PMK) according to RFC2548 section 2.4.2 for use as String in a MS-MPPE-Recv-Key or MS-MPPE-Send-Key attribute.
prf/5*Use the Pseudo-Random Function (PRF) of a TLS session to generate extra key material.
get_diameter_attributes/1*

Function Details

init/1

init(Args) -> Result

Initialize the ocs_eap_ttls_fsm finite state machine.

See also: //stdlib/gen_fsm:init/1.

ssl_start/2

ssl_start(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the ssl_start state. @see //stdlib/gen_fsm:StateName/2

eap_start/2

eap_start(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the eap_start state. @see //stdlib/gen_fsm:StateName/2

client_hello/2

client_hello(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the client_hello state. @see //stdlib/gen_fsm:StateName/2

server_hello/2

server_hello(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the server_hello state. @see //stdlib/gen_fsm:StateName/2

client_cipher/2

client_cipher(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the client_cipher state. @see //stdlib/gen_fsm:StateName/2

server_cipher/2

server_cipher(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the server_cipher state. @see //stdlib/gen_fsm:StateName/2

finish/2

finish(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the finish state. @see //stdlib/gen_fsm:StateName/2

client_passthrough/2

client_passthrough(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the client_passthrough state. @see //stdlib/gen_fsm:StateName/2

server_passthrough/2

server_passthrough(Event, StateData) -> Result

Handle events sent with gen_fsm:send_event/2 in the server_passthrough state. @see //stdlib/gen_fsm:StateName/2

handle_event/3

handle_event(Event, StateName, StateData) -> Result

Handle an event sent with gen_fsm:send_all_state_event/2.

See also: //stdlib/gen_fsm:handle_event/3.

handle_sync_event/4

handle_sync_event(Event, From, StateName, StateData) -> Result

Handle an event sent with gen_fsm:sync_send_all_state_event/2,3.

See also: //stdlib/gen_fsm:handle_sync_event/4.

handle_info/3

handle_info(Info, StateName, StateData) -> Result

Handle a received message.

See also: //stdlib/gen_fsm:handle_info/3.

terminate/3

terminate(Reason, StateName, StateData) -> any()

Cleanup and exit.

See also: //stdlib/gen_fsm:terminate/3.

code_change/4

code_change(OldVsn, StateName, StateData, Extra) -> Result

Update internal state data during a release upgrade/downgrade.

See also: //stdlib/gen_fsm:code_change/4.

encrypt_key/4 *

encrypt_key(Secret, RequestAuthenticator, Salt, Key) -> Ciphertext

Encrypt the Pairwise Master Key (PMK) according to RFC2548 section 2.4.2 for use as String in a MS-MPPE-Recv-Key or MS-MPPE-Send-Key attribute.

prf/5 *

prf(SslSocket, Secret, Label, Seed, WantedLength) -> {ok, MSK, EMSK} | {error, Reason}

Use the Pseudo-Random Function (PRF) of a TLS session to generate extra key material.

get_diameter_attributes/1 *

get_diameter_attributes(Packet) -> Result


Generated by EDoc