ssl_record

Types


ssl_atom_version() = tls_record:tls_atom_version()

ssl_version() = {integer(), integer()}

Functions


init_connection_states(Role::client | server) -> #connection_states{}

current_connection_state(Connection_states::#connection_states{}, X2::read | write) -> #connection_state{}

pending_connection_state(Connection_states::#connection_states{}, X2::read | write) -> term()

activate_pending_connection_state(Connection_states::#connection_states{}, X2::read | write) -> #connection_states{}

set_security_params(Security_parameters::#security_parameters{}, Security_parameters::#security_parameters{}, Connection_states::#connection_states{}) -> #connection_states{}

set_mac_secret(ClientWriteMacSecret::binary(), ServerWriteMacSecret::binary(), X3::client | server, Connection_states::#connection_states{}) -> #connection_states{}

set_master_secret(MasterSecret::binary(), Connection_states::#connection_states{}) -> #connection_states{}

set_renegotiation_flag(Flag::boolean(), Connection_states::#connection_states{}) -> #connection_states{}

set_client_verify_data(X1::current_read | current_write | current_both, Data::binary(), Connection_states::#connection_states{}) -> #connection_states{}

set_server_verify_data(X1::current_read | current_write | current_both, Data::binary(), Connection_states::#connection_states{}) -> #connection_states{}

set_pending_cipher_state(Connection_states::#connection_states{}, Cipher_state::#cipher_state{}, Cipher_state::#cipher_state{}, X4::client | server) -> #connection_states{}

encode_handshake(Frag::iolist(), Version::ssl_version(), Connection_states::#connection_states{}) -> {iolist(), #connection_states{}}

encode_alert_record(Alert::#alert{}, Version::ssl_version(), Connection_states::#connection_states{}) -> {iolist(), #connection_states{}}

encode_change_cipher_spec(Version::ssl_version(), Connection_states::#connection_states{}) -> {iolist(), #connection_states{}}

encode_data(Frag::binary(), Version::ssl_version(), Connection_states::#connection_states{}) -> {iolist(), #connection_states{}}

uncompress(X1, Data, CS) -> term()

compress(X1, Data, CS) -> term()

compressions() -> [binary()]

cipher(Version::ssl_version(), Fragment::iodata(), Connection_state::#connection_state{}, MacHash::binary()) -> {CipherFragment::binary(), #connection_state{}}

decipher(Version::ssl_version(), CipherFragment::binary(), Connection_state::#connection_state{}) -> {binary(), binary(), #connection_state{}} | #alert{}

is_correct_mac(Mac, H) -> term()