diff options
author | Ingela Anderton Andin <[email protected]> | 2013-11-20 15:54:47 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-12-02 09:50:28 +0100 |
commit | 1b6cb772ce5d1d1b7ce280c22e6a8d2ceb8165ed (patch) | |
tree | f5a589caf700715209b744e1f8c1984d2fa68cfd /lib/ssl/src/ssl_alert.erl | |
parent | b84f16e07336eecfb6dd30a4ef3824de76525265 (diff) | |
download | otp-1b6cb772ce5d1d1b7ce280c22e6a8d2ceb8165ed.tar.gz otp-1b6cb772ce5d1d1b7ce280c22e6a8d2ceb8165ed.tar.bz2 otp-1b6cb772ce5d1d1b7ce280c22e6a8d2ceb8165ed.zip |
ssl: Refactor connetion handling
Diffstat (limited to 'lib/ssl/src/ssl_alert.erl')
-rw-r--r-- | lib/ssl/src/ssl_alert.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_alert.erl b/lib/ssl/src/ssl_alert.erl index 1810043dfb..5c842b4d19 100644 --- a/lib/ssl/src/ssl_alert.erl +++ b/lib/ssl/src/ssl_alert.erl @@ -29,12 +29,23 @@ -include("ssl_alert.hrl"). -include("ssl_record.hrl"). +-include("ssl_internal.hrl"). --export([alert_txt/1, reason_code/2]). +-export([encode/3, alert_txt/1, reason_code/2]). %%==================================================================== %% Internal application API %%==================================================================== + +%%-------------------------------------------------------------------- +-spec encode(#alert{}, tls_version(), #connection_states{}) -> + {iolist(), #connection_states{}}. +%% +%% Description: +%%-------------------------------------------------------------------- +encode(#alert{} = Alert, Version, ConnectionStates) -> + ssl_record:encode_alert_record(Alert, Version, ConnectionStates). + %%-------------------------------------------------------------------- -spec reason_code(#alert{}, client | server) -> closed | {essl, string()}. %% |