aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_connection.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-08-19 10:47:21 +0200
committerIngela Anderton Andin <[email protected]>2016-09-05 14:37:27 +0200
commitc694ef2b5e96a69eefd215a65667a03fade1e32e (patch)
treed317ae3bbd4d548ea35e86fc3a605095e48784d3 /lib/ssl/src/dtls_connection.erl
parent147ed05c7fb3a8c4176d8f19fd86454ea9bf9603 (diff)
downloadotp-c694ef2b5e96a69eefd215a65667a03fade1e32e.tar.gz
otp-c694ef2b5e96a69eefd215a65667a03fade1e32e.tar.bz2
otp-c694ef2b5e96a69eefd215a65667a03fade1e32e.zip
ssl, dtls: Refactor sni handling
Diffstat (limited to 'lib/ssl/src/dtls_connection.erl')
-rw-r--r--lib/ssl/src/dtls_connection.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index da7c61cef0..c02cf51a9a 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -44,7 +44,8 @@
%% Handshake handling
-export([renegotiate/2,
reinit_handshake_data/1,
- send_handshake/2, queue_handshake/2, queue_change_cipher/2]).
+ send_handshake/2, queue_handshake/2, queue_change_cipher/2,
+ select_sni_extension/1]).
%% Alert and close handling
-export([send_alert/2, close/5]).
@@ -147,6 +148,11 @@ reinit_handshake_data(#state{protocol_buffers = Buffers} = State) ->
Buffers#protocol_buffers{dtls_fragment_state =
dtls_handshake:dtls_handshake_new_flight(0)}}.
+select_sni_extension(#client_hello{extensions = HelloExtensions}) ->
+ HelloExtensions#hello_extensions.sni;
+select_sni_extension(_) ->
+ undefined.
+
%%====================================================================
%% tls_connection_sup API
%%====================================================================