aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_connection.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-06-04 17:14:53 +0200
committerPéter Dimitrov <[email protected]>2018-06-20 15:18:37 +0200
commiteae3952b4af6c3afff39dd0dd5e6b72291566b4a (patch)
tree16a79afaa1b10b427c2d122ac51a4d0868eb3476 /lib/ssl/src/tls_connection.erl
parent6e0ee7a598c892b6db3282bd719583b68f2d8a89 (diff)
downloadotp-eae3952b4af6c3afff39dd0dd5e6b72291566b4a.tar.gz
otp-eae3952b4af6c3afff39dd0dd5e6b72291566b4a.tar.bz2
otp-eae3952b4af6c3afff39dd0dd5e6b72291566b4a.zip
ssl: Add logging for TLS Handshake Protocol
- Add logging for TLS Handshake messages. - Remove version from the input map used in format/2. Change-Id: I1a8a3dbe5854d3b25cca33e9a6634ac9a53d5867
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r--lib/ssl/src/tls_connection.erl20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 6b9e4540f4..f1291ec7b4 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -270,8 +270,11 @@ queue_handshake(Handshake, #state{negotiated_version = Version,
encode_handshake(Handshake, Version, ConnectionStates0, Hist0),
Report = #{direction => outbound,
protocol => 'tls_record',
- message => BinHandshake,
- version => Version},
+ message => BinHandshake},
+ HandshakeMsg = #{direction => outbound,
+ protocol => 'handshake',
+ message => Handshake},
+ logger:info(HandshakeMsg, #{domain => [beam,erlang,otp,ssl,handshake]}),
logger:info(Report, #{domain => [beam,erlang,otp,ssl,tls_record]}),
State0#state{connection_states = ConnectionStates,
tls_handshake_history = Hist,
@@ -290,8 +293,7 @@ queue_change_cipher(Msg, #state{negotiated_version = Version,
encode_change_cipher(Msg, Version, ConnectionStates0),
Report = #{direction => outbound,
protocol => 'tls_record',
- message => BinChangeCipher,
- version => Version},
+ message => BinChangeCipher},
logger:info(Report, #{domain => [beam,erlang,otp,ssl,tls_record]}),
State0#state{connection_states = ConnectionStates,
flight_buffer = Flight0 ++ [BinChangeCipher]}.
@@ -327,8 +329,7 @@ send_alert(Alert, #state{negotiated_version = Version,
send(Transport, Socket, BinMsg),
Report = #{direction => outbound,
protocol => 'tls_record',
- message => BinMsg,
- version => Version},
+ message => BinMsg},
logger:info(Report, #{domain => [beam,erlang,otp,ssl,tls_record]}),
State0#state{connection_states = ConnectionStates}.
@@ -435,8 +436,11 @@ init({call, From}, {start, Timeout},
send(Transport, Socket, BinMsg),
Report = #{direction => outbound,
protocol => 'tls_record',
- message => BinMsg,
- version => HelloVersion},
+ message => BinMsg},
+ HelloMsg = #{direction => outbound,
+ protocol => 'handshake',
+ message => Hello},
+ logger:info(HelloMsg, #{domain => [beam,erlang,otp,ssl,handshake]}),
logger:info(Report, #{domain => [beam,erlang,otp,ssl,tls_record]}),
State1 = State0#state{connection_states = ConnectionStates,
negotiated_version = Version, %% Requested version