diff options
author | Ingela Anderton Andin <[email protected]> | 2014-05-26 15:42:32 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2014-05-27 09:57:40 +0200 |
commit | 84e838eb0c83a5cee16bb3b2ff8b6a3a8d6306d4 (patch) | |
tree | 9ab45234274d5d149c070f65875511ccdae4214b /lib/ssl/src/ssl_connection.erl | |
parent | 4c74437b2318d40dceabb4e9a02117d2cabf25fc (diff) | |
download | otp-84e838eb0c83a5cee16bb3b2ff8b6a3a8d6306d4.tar.gz otp-84e838eb0c83a5cee16bb3b2ff8b6a3a8d6306d4.tar.bz2 otp-84e838eb0c83a5cee16bb3b2ff8b6a3a8d6306d4.zip |
ssl: Add format_status function to ssl connection process
Diffstat (limited to 'lib/ssl/src/ssl_connection.erl')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index d1d4aa3ffc..34006612a2 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -50,7 +50,7 @@ %% SSL FSM state functions -export([hello/3, abbreviated/3, certify/3, cipher/3, connection/3]). %% SSL all state functions --export([handle_sync_event/4, handle_info/3, terminate/3]). +-export([handle_sync_event/4, handle_info/3, terminate/3, format_status/2]). %%==================================================================== @@ -925,6 +925,30 @@ terminate(_Reason, _StateName, #state{transport_cb = Transport, notify_renegotiater(Renegotiate), Transport:close(Socket). +format_status(normal, [_, State]) -> + [{data, [{"StateData", State}]}]; +format_status(terminate, [_, State]) -> + SslOptions = (State#state.ssl_options), + NewOptions = SslOptions#ssl_options{password = "***", + cert = "***", + cacerts = "***", + key = "***", + dh = "***", + psk_identity = "***", + srp_identity = "***"}, + [{data, [{"StateData", State#state{connection_states = "***", + protocol_buffers = "***", + user_data_buffer = "***", + tls_handshake_history = "***", + session = "***", + private_key = "***", + diffie_hellman_params = "***", + diffie_hellman_keys = "***", + srp_params = "***", + srp_keys = "***", + premaster_secret = "***", + ssl_options = NewOptions + }}]}]. %%-------------------------------------------------------------------- %%% Internal functions %%-------------------------------------------------------------------- |