tls_handshake

DATA TYPES

db_handle() = term()
der_cert() = binary()
host() = ip_address() (see module inet) | hostname() (see module inet)
session_id() = 0 | binary()
tls_handshake() = #client_hello{} | ssl_handshake() (see module ssl_handshake)

Functions


client_hello(Host::host(), Port::port_number() (see module inet), Connection_states::#connection_states{}, Ssl_options::#ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), 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), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)}, password=undefined | string(), cacerts=undefined | [der_encoded() (see module public_key)], cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key), dhfile=undefined | binary(), user_lookup_fun=any(), psk_identity=undefined | binary(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), next_protocols_advertised=any(), next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), honor_cipher_order=any()}, Cache::integer(), CacheCb::atom(), Renegotiation::boolean(), OwnCert::der_cert()) -> #client_hello{}

hello(Server_hello::#server_hello{} | #client_hello{}, Ssl_options::#ssl_options{protocol=undefined | tls | dtls, versions=undefined | [ssl_version() (see module ssl_record)], verify=undefined | verify_none | verify_peer, verify_fun=any(), 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), keyfile=undefined | binary(), key=undefined | {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded() (see module public_key)}, password=undefined | string(), cacerts=undefined | [der_encoded() (see module public_key)], cacertfile=undefined | binary(), dh=undefined | der_encoded() (see module public_key), dhfile=undefined | binary(), user_lookup_fun=any(), psk_identity=undefined | binary(), srp_identity=any(), ciphers=any(), reuse_session=any(), reuse_sessions=undefined | boolean(), renegotiate_at=any(), secure_renegotiate=any(), hibernate_after=undefined | boolean(), erl_dist=boolean(), next_protocols_advertised=any(), next_protocol_selector=any(), log_alert=undefined | boolean(), server_name_indication=any(), honor_cipher_order=any()}, ConnectionStates0::#connection_states{} | {port_number() (see module inet), #session{}, db_handle(), atom(), #connection_states{}, binary() | undefined}, Renegotiation::boolean()) -> {tls_version() (see module tls_record), session_id(), #connection_states{}, binary() | undefined} | {tls_version() (see module tls_record), {resumed | new, #session{}}, #connection_states{}, [binary()] | undefined, [oid() (see module ssl_handshake)] | undefined, [oid() (see module ssl_handshake)] | undefined} | #alert{}

encode_handshake(Package::tls_handshake(), Version::tls_version() (see module tls_record)) -> iolist()

get_tls_handshake(Version::tls_version() (see module tls_record), Data::binary(), Buffer::binary() | iolist()) -> {[tls_handshake()], binary()}

decode_handshake(Version, Tag, Msg) -> term()

View Functions