ssl_connection

Types


certdb_ref() = reference()

ciphers() = [ssl_cipher:erl_cipher_suite()] | string()

connect_option() = socket_connect_option()
                         | ssl_option()
                         | transport_option()

db_handle() = term()

gen_fsm_state_return() = {next_state, state_name(), term()}
                               | {next_state,
                                  state_name(),
                                  term(),
                                  timeout()}
                               | {stop, term(), term()}

listen_option() = socket_listen_option()
                        | ssl_option()
                        | transport_option()

path() = string()

prf_random() = client_random | server_random

reason() = term()

secret_printout() = list()

socket_connect_option() = gen_tcp:connect_option()

socket_listen_option() = gen_tcp:listen_option()

ssl_imp() = new | old

ssl_option() = {versions, ssl_record:ssl_atom_version()}
                     | {verify, verify_type()}
                     | {verify_fun,
                        {function(), InitialUserState :: term()}}
                     | {fail_if_no_peer_cert, boolean()}
                     | {depth, integer()}
                     | {cert, Der :: binary()}
                     | {certfile, path()}
                     | {key, Der :: binary()}
                     | {keyfile, path()}
                     | {password, string()}
                     | {cacerts, [Der :: binary()]}
                     | {cacertfile, path()}
                     | {dh, Der :: binary()}
                     | {dhfile, path()}
                     | {user_lookup_fun,
                        {function(), InitialUserState :: term()}}
                     | {psk_identity, string()}
                     | {srp_identity, {string(), string()}}
                     | {ciphers, ciphers()}
                     | {ssl_imp, ssl_imp()}
                     | {reuse_sessions, boolean()}
                     | {reuse_session, function()}
                     | {hibernate_after, integer() | undefined}
                     | {alpn_advertised_protocols, [binary()]}
                     | {alpn_preferred_protocols, [binary()]}
                     | {next_protocols_advertised, [binary()]}
                     | {client_preferred_next_protocols,
                        binary(),
                        client | server,
                        [binary()]}

sslsocket() = #sslsocket{}

state_name() = hello
                     | abbreviated
                     | certify
                     | cipher
                     | connection

transport_option() =
            {cb_info,
             {CallbackModule :: atom(),
              DataTag :: atom(),
              ClosedTag :: atom(),
              ErrTag :: atom()}}

verify_type() = verify_none | verify_peer

Functions


connect(Connection::tls_connection | dtls_connection, Host::host(), Port::port_number() (see module inet), Socket::port(), Options::{#ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, #socket_options{}, undefined}, User::pid(), CbInfo::tuple(), Timeout::timeout()) -> {ok, #sslsocket{}} | {error, reason()}

ssl_accept(Connection::tls_connection | dtls_connection, Port::port_number() (see module inet), Socket::port(), Opts::{#ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, #socket_options{}, undefined | pid()}, User::pid(), CbInfo::tuple(), Timeout::timeout()) -> {ok, #sslsocket{}} | {error, reason()}

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

handshake(Sslsocket::#sslsocket{}, SslOptions::{#ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, #socket_options{}}, Timeout::timeout()) -> ok | {error, reason()}

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

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

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

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

connection_information(Pid::pid()) -> {ok, list()} | {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_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()}

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()}

handle_session(Server_hello, Version, NewId, ConnectionStates, ProtoExt, Protocol0, State) -> term()

hello(Hello_request::start | #hello_request{} | #server_hello{} | term(), State::#state{role=undefined | client | server, user_application=undefined | {Monitor::reference(), User::pid()}, transport_cb=undefined | atom(), protocol_cb=undefined | tls_connection | dtls_connection, data_tag=undefined | atom(), close_tag=undefined | atom(), error_tag=undefined | atom(), host=undefined | string() | ip_address() (see module inet), port=undefined | integer(), socket=undefined | port(), ssl_options=undefined | #ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, socket_options=undefined | #socket_options{}, connection_states=undefined | #connection_states{} | secret_printout(), protocol_buffers=undefined | term() | secret_printout(), tls_handshake_history=undefined | ssl_handshake_history() (see module ssl_handshake) | secret_printout(), cert_db=undefined | reference(), session=undefined | #session{} | secret_printout(), session_cache=undefined | db_handle(), session_cache_cb=undefined | atom(), crl_db=undefined | term(), negotiated_version=undefined | ssl_version() (see module ssl_record), client_certificate_requested=boolean(), key_algorithm=undefined | key_algo() (see module ssl_cipher), hashsign_algorithm=any(), cert_hashsign_algorithm=any(), public_key_info=undefined | public_key_info() (see module ssl_handshake), private_key=undefined | private_key() (see module public_key) | secret_printout(), diffie_hellman_params=#'DHParameter'{} | undefined | secret_printout(), diffie_hellman_keys={PublicKey::binary(), PrivateKey::binary()} | #'ECPrivateKey'{} | undefined | secret_printout(), psk_identity=undefined | binary(), srp_params=undefined | #srp_user{generator=undefined | binary(), prime=undefined | binary(), salt=undefined | binary(), verifier=undefined | binary()} | secret_printout(), srp_keys=undefined | {PublicKey::binary(), PrivateKey::binary()} | secret_printout(), premaster_secret=undefined | binary() | secret_printout(), file_ref_db=undefined | db_handle(), cert_db_ref=undefined | certdb_ref(), bytes_to_read=undefined | integer(), user_data_buffer=undefined | binary() | secret_printout(), renegotiation=undefined | {boolean(), From::term() | internal | peer}, start_or_recv_from=undefined | term(), timer=undefined | reference(), send_queue=undefined | queue() (see module queue), terminated=boolean(), allow_renegotiate=boolean(), expecting_next_protocol_negotiation=boolean(), expecting_finished=boolean(), negotiated_protocol=undefined | binary(), client_ecc=any(), tracker=undefined | pid(), sni_hostname=any()}, Connection::tls_connection | dtls_connection) -> gen_fsm_state_return()

abbreviated(Hello_request::#hello_request{} | #finished{} | term(), State::#state{role=undefined | client | server, user_application=undefined | {Monitor::reference(), User::pid()}, transport_cb=undefined | atom(), protocol_cb=undefined | tls_connection | dtls_connection, data_tag=undefined | atom(), close_tag=undefined | atom(), error_tag=undefined | atom(), host=undefined | string() | ip_address() (see module inet), port=undefined | integer(), socket=undefined | port(), ssl_options=undefined | #ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, socket_options=undefined | #socket_options{}, connection_states=undefined | #connection_states{} | secret_printout(), protocol_buffers=undefined | term() | secret_printout(), tls_handshake_history=undefined | ssl_handshake_history() (see module ssl_handshake) | secret_printout(), cert_db=undefined | reference(), session=undefined | #session{} | secret_printout(), session_cache=undefined | db_handle(), session_cache_cb=undefined | atom(), crl_db=undefined | term(), negotiated_version=undefined | ssl_version() (see module ssl_record), client_certificate_requested=boolean(), key_algorithm=undefined | key_algo() (see module ssl_cipher), hashsign_algorithm=any(), cert_hashsign_algorithm=any(), public_key_info=undefined | public_key_info() (see module ssl_handshake), private_key=undefined | private_key() (see module public_key) | secret_printout(), diffie_hellman_params=#'DHParameter'{} | undefined | secret_printout(), diffie_hellman_keys={PublicKey::binary(), PrivateKey::binary()} | #'ECPrivateKey'{} | undefined | secret_printout(), psk_identity=undefined | binary(), srp_params=undefined | #srp_user{generator=undefined | binary(), prime=undefined | binary(), salt=undefined | binary(), verifier=undefined | binary()} | secret_printout(), srp_keys=undefined | {PublicKey::binary(), PrivateKey::binary()} | secret_printout(), premaster_secret=undefined | binary() | secret_printout(), file_ref_db=undefined | db_handle(), cert_db_ref=undefined | certdb_ref(), bytes_to_read=undefined | integer(), user_data_buffer=undefined | binary() | secret_printout(), renegotiation=undefined | {boolean(), From::term() | internal | peer}, start_or_recv_from=undefined | term(), timer=undefined | reference(), send_queue=undefined | queue() (see module queue), terminated=boolean(), allow_renegotiate=boolean(), expecting_next_protocol_negotiation=boolean(), expecting_finished=boolean(), negotiated_protocol=undefined | binary(), client_ecc=any(), tracker=undefined | pid(), sni_hostname=any()}, Connection::tls_connection | dtls_connection) -> 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=undefined | client | server, user_application=undefined | {Monitor::reference(), User::pid()}, transport_cb=undefined | atom(), protocol_cb=undefined | tls_connection | dtls_connection, data_tag=undefined | atom(), close_tag=undefined | atom(), error_tag=undefined | atom(), host=undefined | string() | ip_address() (see module inet), port=undefined | integer(), socket=undefined | port(), ssl_options=undefined | #ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, socket_options=undefined | #socket_options{}, connection_states=undefined | #connection_states{} | secret_printout(), protocol_buffers=undefined | term() | secret_printout(), tls_handshake_history=undefined | ssl_handshake_history() (see module ssl_handshake) | secret_printout(), cert_db=undefined | reference(), session=undefined | #session{} | secret_printout(), session_cache=undefined | db_handle(), session_cache_cb=undefined | atom(), crl_db=undefined | term(), negotiated_version=undefined | ssl_version() (see module ssl_record), client_certificate_requested=boolean(), key_algorithm=undefined | key_algo() (see module ssl_cipher), hashsign_algorithm=any(), cert_hashsign_algorithm=any(), public_key_info=undefined | public_key_info() (see module ssl_handshake), private_key=undefined | private_key() (see module public_key) | secret_printout(), diffie_hellman_params=#'DHParameter'{} | undefined | secret_printout(), diffie_hellman_keys={PublicKey::binary(), PrivateKey::binary()} | #'ECPrivateKey'{} | undefined | secret_printout(), psk_identity=undefined | binary(), srp_params=undefined | #srp_user{generator=undefined | binary(), prime=undefined | binary(), salt=undefined | binary(), verifier=undefined | binary()} | secret_printout(), srp_keys=undefined | {PublicKey::binary(), PrivateKey::binary()} | secret_printout(), premaster_secret=undefined | binary() | secret_printout(), file_ref_db=undefined | db_handle(), cert_db_ref=undefined | certdb_ref(), bytes_to_read=undefined | integer(), user_data_buffer=undefined | binary() | secret_printout(), renegotiation=undefined | {boolean(), From::term() | internal | peer}, start_or_recv_from=undefined | term(), timer=undefined | reference(), send_queue=undefined | queue() (see module queue), terminated=boolean(), allow_renegotiate=boolean(), expecting_next_protocol_negotiation=boolean(), expecting_finished=boolean(), negotiated_protocol=undefined | binary(), client_ecc=any(), tracker=undefined | pid(), sni_hostname=any()}, Connection::tls_connection | dtls_connection) -> gen_fsm_state_return()

cipher(Hello_request::#hello_request{} | #certificate_verify{} | #finished{} | term(), State::#state{role=undefined | client | server, user_application=undefined | {Monitor::reference(), User::pid()}, transport_cb=undefined | atom(), protocol_cb=undefined | tls_connection | dtls_connection, data_tag=undefined | atom(), close_tag=undefined | atom(), error_tag=undefined | atom(), host=undefined | string() | ip_address() (see module inet), port=undefined | integer(), socket=undefined | port(), ssl_options=undefined | #ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, socket_options=undefined | #socket_options{}, connection_states=undefined | #connection_states{} | secret_printout(), protocol_buffers=undefined | term() | secret_printout(), tls_handshake_history=undefined | ssl_handshake_history() (see module ssl_handshake) | secret_printout(), cert_db=undefined | reference(), session=undefined | #session{} | secret_printout(), session_cache=undefined | db_handle(), session_cache_cb=undefined | atom(), crl_db=undefined | term(), negotiated_version=undefined | ssl_version() (see module ssl_record), client_certificate_requested=boolean(), key_algorithm=undefined | key_algo() (see module ssl_cipher), hashsign_algorithm=any(), cert_hashsign_algorithm=any(), public_key_info=undefined | public_key_info() (see module ssl_handshake), private_key=undefined | private_key() (see module public_key) | secret_printout(), diffie_hellman_params=#'DHParameter'{} | undefined | secret_printout(), diffie_hellman_keys={PublicKey::binary(), PrivateKey::binary()} | #'ECPrivateKey'{} | undefined | secret_printout(), psk_identity=undefined | binary(), srp_params=undefined | #srp_user{generator=undefined | binary(), prime=undefined | binary(), salt=undefined | binary(), verifier=undefined | binary()} | secret_printout(), srp_keys=undefined | {PublicKey::binary(), PrivateKey::binary()} | secret_printout(), premaster_secret=undefined | binary() | secret_printout(), file_ref_db=undefined | db_handle(), cert_db_ref=undefined | certdb_ref(), bytes_to_read=undefined | integer(), user_data_buffer=undefined | binary() | secret_printout(), renegotiation=undefined | {boolean(), From::term() | internal | peer}, start_or_recv_from=undefined | term(), timer=undefined | reference(), send_queue=undefined | queue() (see module queue), terminated=boolean(), allow_renegotiate=boolean(), expecting_next_protocol_negotiation=boolean(), expecting_finished=boolean(), negotiated_protocol=undefined | binary(), client_ecc=any(), tracker=undefined | pid(), sni_hostname=any()}, Connection::tls_connection | dtls_connection) -> gen_fsm_state_return()

connection(Msg::term(), State::#state{role=undefined | client | server, user_application=undefined | {Monitor::reference(), User::pid()}, transport_cb=undefined | atom(), protocol_cb=undefined | tls_connection | dtls_connection, data_tag=undefined | atom(), close_tag=undefined | atom(), error_tag=undefined | atom(), host=undefined | string() | ip_address() (see module inet), port=undefined | integer(), socket=undefined | port(), ssl_options=undefined | #ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), partial_chain=undefined | function(), fail_if_no_peer_cert=undefined | boolean(), verify_client_once=undefined | boolean(), validate_extensions_fun=any(), depth=undefined | integer(), certfile=undefined | binary(), cert=undefined | der_encoded() (see module public_key) | secret_printout(), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)} | secret_printout(), password=undefined | string() | secret_printout(), cacerts=undefined | [der_encoded() (see module public_key)] | secret_printout(), cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key) | secret_printout(), dhfile=undefined | binary() | secret_printout(), user_lookup_fun=any(), psk_identity=undefined | binary() | secret_printout(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), client_renegotiation=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), alpn_advertised_protocols=[binary()] | undefined, alpn_preferred_protocols=[binary()] | undefined, next_protocols_advertised=[binary()] | undefined, next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), sni_hosts=undefined | [{hostname() (see module inet), [tuple()]}], sni_fun=function() | undefined, honor_cipher_order=boolean(), padding_check=boolean(), fallback=boolean(), crl_check=undefined | boolean() | peer | best_effort, crl_cache=any()}, socket_options=undefined | #socket_options{}, connection_states=undefined | #connection_states{} | secret_printout(), protocol_buffers=undefined | term() | secret_printout(), tls_handshake_history=undefined | ssl_handshake_history() (see module ssl_handshake) | secret_printout(), cert_db=undefined | reference(), session=undefined | #session{} | secret_printout(), session_cache=undefined | db_handle(), session_cache_cb=undefined | atom(), crl_db=undefined | term(), negotiated_version=undefined | ssl_version() (see module ssl_record), client_certificate_requested=boolean(), key_algorithm=undefined | key_algo() (see module ssl_cipher), hashsign_algorithm=any(), cert_hashsign_algorithm=any(), public_key_info=undefined | public_key_info() (see module ssl_handshake), private_key=undefined | private_key() (see module public_key) | secret_printout(), diffie_hellman_params=#'DHParameter'{} | undefined | secret_printout(), diffie_hellman_keys={PublicKey::binary(), PrivateKey::binary()} | #'ECPrivateKey'{} | undefined | secret_printout(), psk_identity=undefined | binary(), srp_params=undefined | #srp_user{generator=undefined | binary(), prime=undefined | binary(), salt=undefined | binary(), verifier=undefined | binary()} | secret_printout(), srp_keys=undefined | {PublicKey::binary(), PrivateKey::binary()} | secret_printout(), premaster_secret=undefined | binary() | secret_printout(), file_ref_db=undefined | db_handle(), cert_db_ref=undefined | certdb_ref(), bytes_to_read=undefined | integer(), user_data_buffer=undefined | binary() | secret_printout(), renegotiation=undefined | {boolean(), From::term() | internal | peer}, start_or_recv_from=undefined | term(), timer=undefined | reference(), send_queue=undefined | queue() (see module queue), terminated=boolean(), allow_renegotiate=boolean(), expecting_next_protocol_negotiation=boolean(), expecting_finished=boolean(), negotiated_protocol=undefined | binary(), client_ecc=any(), tracker=undefined | pid(), sni_hostname=any()}, Connection::tls_connection | dtls_connection) -> gen_fsm_state_return()

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

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

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

format_status(X1, X2) -> term()