aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_handshake.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-01-07 14:44:55 +0100
committerIngela Anderton Andin <[email protected]>2019-01-07 14:44:55 +0100
commitd8bbddd29dc2d30d8648ff6dd3006c5db0f6fd21 (patch)
tree309d363fc91eb22c2cffdd20abdbed863951539c /lib/ssl/src/dtls_handshake.erl
parent536bd25f37b66537a7006498504aa04af91d2ef3 (diff)
parent5096bb6c39d133e51d4f96c74d9e93d546fe3773 (diff)
downloadotp-d8bbddd29dc2d30d8648ff6dd3006c5db0f6fd21.tar.gz
otp-d8bbddd29dc2d30d8648ff6dd3006c5db0f6fd21.tar.bz2
otp-d8bbddd29dc2d30d8648ff6dd3006c5db0f6fd21.zip
Merge branch 'ingela/ssl/error-handling-should-be-throw/OTP-15502' into maint
* ingela/ssl/error-handling-should-be-throw/OTP-15502: ssl: Clean up extension handling
Diffstat (limited to 'lib/ssl/src/dtls_handshake.erl')
-rw-r--r--lib/ssl/src/dtls_handshake.erl15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/ssl/src/dtls_handshake.erl b/lib/ssl/src/dtls_handshake.erl
index 3f70eaec8a..1917d51c03 100644
--- a/lib/ssl/src/dtls_handshake.erl
+++ b/lib/ssl/src/dtls_handshake.erl
@@ -215,8 +215,6 @@ handle_client_hello_extensions(Version, Type, Random, CipherSuites,
HelloExt, dtls_v1:corresponding_tls_version(Version),
SslOpts, Session0,
ConnectionStates0, Renegotiation) of
- #alert{} = Alert ->
- Alert;
{Session, ConnectionStates, Protocol, ServerHelloExt} ->
{Version, {Type, Session}, ConnectionStates, Protocol, ServerHelloExt, HashSign}
catch throw:Alert ->
@@ -225,17 +223,16 @@ handle_client_hello_extensions(Version, Type, Random, CipherSuites,
handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation) ->
- case ssl_handshake:handle_server_hello_extensions(dtls_record, Random, CipherSuite,
- Compression, HelloExt,
- dtls_v1:corresponding_tls_version(Version),
- SslOpt, ConnectionStates0, Renegotiation) of
- #alert{} = Alert ->
- Alert;
+ try ssl_handshake:handle_server_hello_extensions(dtls_record, Random, CipherSuite,
+ Compression, HelloExt,
+ dtls_v1:corresponding_tls_version(Version),
+ SslOpt, ConnectionStates0, Renegotiation) of
{ConnectionStates, ProtoExt, Protocol} ->
{Version, SessionId, ConnectionStates, ProtoExt, Protocol}
+ catch throw:Alert ->
+ Alert
end.
-
%%--------------------------------------------------------------------
enc_handshake(#hello_verify_request{protocol_version = {Major, Minor},