ssl_handshake

DATA TYPES

algo_oid() = {1, 2, 840, 113549, 1, 1, 1} | {1, 2, 840, 10040, 4, 1}
certdb_ref() = reference()
db_handle() = term()
der_cert() = binary()
host() = ip_address() (see module inet) | hostname() (see module inet)
key_algo() = null | rsa | dhe_rsa | dhe_dss | dh_anon
private_key() = #'RSAPrivateKey'{} | #'DSAPrivateKey'{}
public_key_info() = {algo_oid(), #'RSAPublicKey'{} | integer(), public_key_params()}
public_key_params() = #'Dss-Parms'{} | term()
session_id() = 0 | binary()
tls_handshake() = #client_hello{} | #server_hello{} | #server_hello_done{} | #certificate{} | #certificate_request{} | #client_key_exchange{} | #finished{} | #certificate_verify{} | #hello_request{}
tls_version() = {integer(), integer()}

Functions


client_hello(Host::host(), Port::port_number() (see module inet), Connection_states::#connection_states{}, Ssl_options::#ssl_options{}, Renegotiation::boolean(), OwnCert::der_cert()) -> #client_hello{}

server_hello(SessionId::session_id(), Version::tls_version(), Connection_states::#connection_states{}, Renegotiation::boolean()) -> #server_hello{}

hello_request() -> #hello_request{}

hello(Server_hello::#server_hello{} | #client_hello{}, Ssl_options::#ssl_options{}, ConnectionStates0::#connection_states{} | {port_number() (see module inet), #session{}, db_handle(), atom(), #connection_states{}, binary()}, Renegotiation::boolean()) -> {tls_version(), session_id(), #connection_states{}} | {tls_version(), {resumed | new, #session{}}, #connection_states{}} | #alert{}

certify(Certificate::#certificate{}, CertDbHandle::db_handle(), CertDbRef::certdb_ref(), MaxPathLen::integer() | nolimit, Verify::verify_peer | verify_none, VerifyFunAndState::{function(), term}, Role::client | server) -> {der_cert(), public_key_info()} | #alert{}

certificate(OwnCert::der_cert(), CertDbHandle::db_handle(), CertDbRef::certdb_ref(), X4::client | server) -> #certificate{} | #alert{}

client_certificate_verify(OwnCert::undefined | der_cert(), MasterSecret::binary(), Version::tls_version(), PrivateKey::private_key(), X5::{{binary(), binary()}, {binary(), binary()}}) -> #certificate_verify{} | ignore | #alert{}

certificate_verify(Signature::binary(), X2::public_key_info(), Version::tls_version(), MasterSecret::binary(), X5::{term(), {binary(), binary()}}) -> valid | #alert{}

certificate_request(Connection_states::#connection_states{}, CertDbHandle::db_handle(), CertDbRef::certdb_ref()) -> #certificate_request{}

key_exchange(X1::client | server, X2::{premaster_secret, binary(), public_key_info()} | {dh, binary()} | {dh, {binary(), binary()}, #'DHParameter'{}, key_algo(), binary(), binary(), private_key()}) -> #client_key_exchange{} | #server_key_exchange{}

master_secret(Version::tls_version(), Session::#session{} | binary(), Connection_states::#connection_states{}, Role::client | server) -> {binary(), #connection_states{}} | #alert{}

finished(Version::tls_version(), Role::client | server, MasterSecret::binary(), X4::{{binary(), binary()}, term()}) -> #finished{}

verify_connection(Version::tls_version(), Finished::#finished{}, Role::client | server, MasterSecret::binary(), X5::{term(), {binary(), binary()}}) -> verified | #alert{}

server_hello_done() -> #server_hello_done{}

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

get_tls_handshake(Data::binary(), Buffer::binary() | iolist()) -> {[tls_handshake()], binary()}

decode_client_key(ClientKey::binary(), Type::key_algo(), Version::tls_version()) -> #encrypted_premaster_secret{} | #client_diffie_hellman_public{}

init_hashes() -> {{binary(), binary()}, {binary(), binary()}}

update_hashes(Hashes::{{binary(), binary()}, {binary(), binary()}}, Data::term()) -> {{binary(), binary()}, {binary(), binary()}}

decrypt_premaster_secret(Secret::binary(), RSAPrivateKey::#'RSAPrivateKey'{}) -> binary()

server_key_exchange_hash(Algorithm::rsa | dhe_rsa | dhe_dss | dh_anon, Value::binary()) -> binary()

prf(X1::tls_version(), Secret::binary(), Label::binary(), Seed::[binary()], WantedLength::non_neg_integer()) -> {ok, binary()} | {error, undefined}

dec_hello_extensions(X1, Acc) -> term()