aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_record_1_3.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-07-25 14:16:34 +0200
committerPéter Dimitrov <[email protected]>2019-07-25 14:57:23 +0200
commitb08621c8a9bf4f8e780de8bba022ad902308cfc8 (patch)
treeb4c8f6911114b6c30f490305acd6697972c6163f /lib/ssl/src/tls_record_1_3.erl
parent73b526ce765dc7ac71fdae349da44941d8201d9c (diff)
downloadotp-b08621c8a9bf4f8e780de8bba022ad902308cfc8.tar.gz
otp-b08621c8a9bf4f8e780de8bba022ad902308cfc8.tar.bz2
otp-b08621c8a9bf4f8e780de8bba022ad902308cfc8.zip
ssl: Fix handshake pause in TLS 1.3
Diffstat (limited to 'lib/ssl/src/tls_record_1_3.erl')
-rw-r--r--lib/ssl/src/tls_record_1_3.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ssl/src/tls_record_1_3.erl b/lib/ssl/src/tls_record_1_3.erl
index 74321a1ae2..d713062284 100644
--- a/lib/ssl/src/tls_record_1_3.erl
+++ b/lib/ssl/src/tls_record_1_3.erl
@@ -138,6 +138,15 @@ decode_cipher_text(#ssl_tls{type = ?ALERT,
{#ssl_tls{type = ?ALERT,
version = {3,4}, %% Internally use real version
fragment = <<2,47>>}, ConnectionStates0};
+%% TLS 1.3 server can receive a User Cancelled Alert when handshake is
+%% paused and then cancelled on the client side.
+decode_cipher_text(#ssl_tls{type = ?ALERT,
+ version = ?LEGACY_VERSION,
+ fragment = <<2,90>>},
+ ConnectionStates0) ->
+ {#ssl_tls{type = ?ALERT,
+ version = {3,4}, %% Internally use real version
+ fragment = <<2,90>>}, ConnectionStates0};
%% RFC8446 - TLS 1.3
%% D.4. Middlebox Compatibility Mode
%% - If not offering early data, the client sends a dummy