aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_connection.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-04-24 11:19:06 +0200
committerIngela Anderton Andin <[email protected]>2014-04-24 11:19:06 +0200
commit5c83684098762433df6638f3e06f90c7a438255c (patch)
tree566afe8bd6c0f6907e51d421e170861304f1ca21 /lib/ssl/src/tls_connection.erl
parenta6964711c50815a4e4824e891ffc4a06fd061970 (diff)
parentabb5c21e25343139e47559dbf9a22d099f97154f (diff)
downloadotp-5c83684098762433df6638f3e06f90c7a438255c.tar.gz
otp-5c83684098762433df6638f3e06f90c7a438255c.tar.bz2
otp-5c83684098762433df6638f3e06f90c7a438255c.zip
Merge branch 'ia/pr/339' into maint
* ia/pr/339: ssl: Fix crash on garbage during handshake
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r--lib/ssl/src/tls_connection.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 8142a18c37..930706cde6 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -751,7 +751,11 @@ handle_tls_handshake(Handle, StateName,
handle_tls_handshake(Handle, NextStateName, State);
{stop, _,_} = Stop ->
Stop
- end.
+ end;
+
+handle_tls_handshake(_Handle, _StateName, #state{}) ->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)).
+
write_application_data(Data0, From,
#state{socket = Socket,
negotiated_version = Version,