diff options
author | Péter Dimitrov <[email protected]> | 2019-03-11 16:32:13 +0100 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2019-03-14 09:53:10 +0100 |
commit | 6608e84968c96366d76b6cc4a854d32a1c458fea (patch) | |
tree | 2ba0310d5b530507a9eb26f9c9b1592c0d9a9c01 /lib/ssl/src/tls_connection.erl | |
parent | ecdfcfd6e85747b37881f873a64ee5ea068a94d1 (diff) | |
download | otp-6608e84968c96366d76b6cc4a854d32a1c458fea.tar.gz otp-6608e84968c96366d76b6cc4a854d32a1c458fea.tar.bz2 otp-6608e84968c96366d76b6cc4a854d32a1c458fea.zip |
ssl: Fix Alert logging
Report the role of the peer when logging incoming Alerts.
Change-Id: I7eec46bc36f9080f5087b6a38e7f14ac628fe286
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 8eb9e56375..39df2ad15b 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -308,9 +308,7 @@ handle_protocol_record(#ssl_tls{type = ?ALERT, fragment = EncAlerts}, StateName, handle_alerts(Alerts, {next_state, StateName, State}); [] -> ssl_connection:handle_own_alert(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, empty_alert), - Version, StateName, State); - #alert{} = Alert -> - ssl_connection:handle_own_alert(Alert, Version, StateName, State) + Version, StateName, State) catch _:_ -> ssl_connection:handle_own_alert(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, alert_decode_error), @@ -1135,6 +1133,7 @@ encode_handshake(Handshake, Version, ConnectionStates0, Hist0) -> encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) -> tls_record:encode_change_cipher_spec(Version, ConnectionStates). +-spec decode_alerts(binary()) -> list(). decode_alerts(Bin) -> ssl_alert:decode(Bin). |