aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_alert.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-01-22 12:29:49 +0100
committerIngela Anderton Andin <[email protected]>2013-01-22 12:29:49 +0100
commit2b7954c51fa9909d6268d8f766fe586d9910a791 (patch)
treee2ca2bb3ac33cbfe5359fce67aca0f5dac1866dd /lib/ssl/src/ssl_alert.erl
parent2db94d0e84729a8f2a474a7cf02e9c94853a1bbe (diff)
parente56167dd6ca8d37d26ea7f19933691a3bda41113 (diff)
downloadotp-2b7954c51fa9909d6268d8f766fe586d9910a791.tar.gz
otp-2b7954c51fa9909d6268d8f766fe586d9910a791.tar.bz2
otp-2b7954c51fa9909d6268d8f766fe586d9910a791.zip
Merge branch 'ia/ssl/incompatible-error-msg/OTP-10451'
* ia/ssl/incompatible-error-msg/OTP-10451: ssl: Enhance error handling
Diffstat (limited to 'lib/ssl/src/ssl_alert.erl')
-rw-r--r--lib/ssl/src/ssl_alert.erl11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/ssl/src/ssl_alert.erl b/lib/ssl/src/ssl_alert.erl
index 222b3f1ad7..f94a1136a0 100644
--- a/lib/ssl/src/ssl_alert.erl
+++ b/lib/ssl/src/ssl_alert.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,8 +36,7 @@
%% Internal application API
%%====================================================================
%%--------------------------------------------------------------------
--spec reason_code(#alert{}, client | server) -> closed | esslconnect |
- esslaccept | string().
+-spec reason_code(#alert{}, client | server) -> closed | {essl, string()}.
%%
%% Description: Returns the error reason that will be returned to the
%% user.
@@ -45,12 +44,8 @@
reason_code(#alert{description = ?CLOSE_NOTIFY}, _) ->
closed;
-reason_code(#alert{description = ?HANDSHAKE_FAILURE}, client) ->
- esslconnect;
-reason_code(#alert{description = ?HANDSHAKE_FAILURE}, server) ->
- esslaccept;
reason_code(#alert{description = Description}, _) ->
- description_txt(Description).
+ {essl, description_txt(Description)}.
%%--------------------------------------------------------------------
-spec alert_txt(#alert{}) -> string().