tls_connection

DATA TYPES

gen_fsm_state_return() = {next_state, state_name(), #state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}} | {next_state, state_name(), #state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}, timeout()} | {stop, term(), #state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}}
host() = ip_address() (see module inet) | hostname() (see module inet)
reason() = term()
state_name() = hello | abbreviated | certify | cipher | connection

Functions


send(Pid::pid(), Data::iodata()) -> ok | {error, reason()}

recv(Pid::pid(), Length::integer(), Timeout::timeout()) -> {ok, binary() | list()} | {error, reason()}

connect(Host::host(), Port::port_number() (see module inet), Socket::port(), Options::{#ssl_options{}, #socket_options{}}, User::pid(), CbInfo::tuple(), Timeout::timeout()) -> {ok, #sslsocket{}} | {error, reason()}

ssl_accept(Port::port_number() (see module inet), Socket::port(), Opts::{#ssl_options{}, #socket_options{}}, User::pid(), CbInfo::tuple(), Timeout::timeout()) -> {ok, #sslsocket{}} | {error, reason()}

handshake(Sslsocket::#sslsocket{}, Timeout::timeout()) -> ok | {error, reason()}

socket_control(Socket::port(), Pid::pid(), Transport::atom()) -> {ok, #sslsocket{}} | {error, reason()}

close(ConnectionPid::pid()) -> ok | {error, reason()}

shutdown(ConnectionPid::pid(), How::atom()) -> ok | {error, reason()}

new_user(ConnectionPid::pid(), User::pid()) -> ok | {error, reason()}

negotiated_next_protocol(ConnectionPid::pid()) -> {ok, binary()} | {error, reason()}

get_opts(ConnectionPid::pid(), OptTags::list()) -> {ok, list()} | {error, reason()}

set_opts(ConnectionPid::pid(), Options::list()) -> ok | {error, reason()}

info(ConnectionPid::pid()) -> {ok, {atom(), tuple()}} | {error, reason()}

session_info(ConnectionPid::pid()) -> {ok, list()} | {error, reason()}

peer_certificate(ConnectionPid::pid()) -> {ok, binary() | undefined} | {error, reason()}

renegotiation(ConnectionPid::pid()) -> ok | {error, reason()}

prf(ConnectionPid::pid(), Secret::binary() | master_secret, Label::binary(), Seed::binary() | prf_random() (see module ssl), WantedLength::non_neg_integer()) -> {ok, binary()} | {error, reason()} | {'EXIT', term()}

start_link(Role::atom(), Host::host(), Port::port_number() (see module inet), Socket::port(), Options::list(), User::pid(), CbInfo::tuple()) -> {ok, pid()} | ignore | {error, reason()}

init(X1) -> term()

hello(Hello_request::start | #hello_request{} | #client_hello{} | #server_hello{} | term(), State::#state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}) -> gen_fsm_state_return()

abbreviated(Hello_request::#hello_request{} | #finished{} | term(), State::#state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}) -> gen_fsm_state_return()

certify(Hello_request::#hello_request{} | #certificate{} | #server_key_exchange{} | #certificate_request{} | #server_hello_done{} | #client_key_exchange{} | term(), State::#state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}) -> gen_fsm_state_return()

cipher(Hello_request::#hello_request{} | #certificate_verify{} | #finished{} | term(), State::#state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}) -> gen_fsm_state_return()

connection(Hello_request::#hello_request{} | #client_hello{} | term(), State::#state{role=any(), user_application=any(), transport_cb=any(), data_tag=any(), close_tag=any(), error_tag=any(), host=any(), port=any(), socket=any(), ssl_options=any(), socket_options=any(), connection_states=any(), tls_packets=any(), tls_record_buffer=any(), tls_handshake_buffer=any(), tls_handshake_history=any(), tls_cipher_texts=any(), cert_db=any(), session=any(), session_cache=any(), session_cache_cb=any(), negotiated_version=any(), client_certificate_requested=any(), key_algorithm=any(), hashsign_algorithm=any(), public_key_info=any(), private_key=any(), diffie_hellman_params=any(), diffie_hellman_keys=any(), psk_identity=any(), srp_params=any(), srp_keys=any(), premaster_secret=any(), file_ref_db=any(), cert_db_ref=any(), bytes_to_read=any(), user_data_buffer=any(), log_alert=any(), renegotiation=any(), start_or_recv_from=any(), timer=any(), send_queue=any(), terminated=any(), allow_renegotiate=any(), expecting_next_protocol_negotiation=boolean(), next_protocol=undefined | binary(), client_ecc=any()}) -> gen_fsm_state_return()

handle_event(Event, StateName, State) -> term()

handle_sync_event(X1, From, StateName, State) -> term()

handle_info(Msg, StateName, State) -> term()

terminate(Reason, StateName, State) -> term()

code_change(OldVsn, StateName, State, Extra) -> term()