diff options
author | Ingela Anderton Andin <[email protected]> | 2019-07-03 09:45:12 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-07-03 09:45:12 +0200 |
commit | e90c742e41feabadadf396d7e99537fa7459fbbf (patch) | |
tree | d17644a83c96dc45fe62f2db89cd2f9240c2cfd5 /lib/ssl | |
parent | 7788362a80a86b34d2228b201b3199b186f2d66a (diff) | |
parent | 9b7ec52ecddf845ea07a90ddcfc0868b8a3e7afd (diff) | |
download | otp-e90c742e41feabadadf396d7e99537fa7459fbbf.tar.gz otp-e90c742e41feabadadf396d7e99537fa7459fbbf.tar.bz2 otp-e90c742e41feabadadf396d7e99537fa7459fbbf.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 323d9e3284..3998f03519 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -336,7 +336,9 @@ 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) + Version, StateName, State); + #alert{} = Alert -> + ssl_connection:handle_own_alert(Alert, Version, StateName, State) catch _:_ -> ssl_connection:handle_own_alert(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, alert_decode_error), @@ -1175,7 +1177,6 @@ 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). |