diff options
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()}. %% |