diff options
author | Ingela Anderton Andin <[email protected]> | 2013-12-02 09:52:58 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-12-02 09:52:58 +0100 |
commit | 239ce1c4781fe4fc25c55795573654453887f507 (patch) | |
tree | 256c7436d2d1e24407422fb525e71258fe23334e /lib/ssl/src/ssl_sup.erl | |
parent | d3e5761436cfbcb5b53edad9e1140e445ce94bfd (diff) | |
parent | 174b36ae2755b501e2b3152f6b00e9c59a90e848 (diff) | |
download | otp-239ce1c4781fe4fc25c55795573654453887f507.tar.gz otp-239ce1c4781fe4fc25c55795573654453887f507.tar.bz2 otp-239ce1c4781fe4fc25c55795573654453887f507.zip |
Merge branch 'ia/ssl/dtls-refactor-continue/OTP-11292' into maint
* ia/ssl/dtls-refactor-continue/OTP-11292:
ssl: Trap exits
ssl: Refactor connetion handling
ssl: API and supervisor
ssl: Dialyzer fixes
ssl: Test case enhancement
ssl: Refactor API
ssl, public_key: Dialyzer fixes
ssl: Refactor premaster secret handling
ssl: Refactor connection and handshake handling
ssl: Refactor handshake and record handling
Diffstat (limited to 'lib/ssl/src/ssl_sup.erl')
-rw-r--r-- | lib/ssl/src/ssl_sup.erl | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/lib/ssl/src/ssl_sup.erl b/lib/ssl/src/ssl_sup.erl index 59039a6e0a..77b40a7b38 100644 --- a/lib/ssl/src/ssl_sup.erl +++ b/lib/ssl/src/ssl_sup.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2011. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -43,22 +43,12 @@ start_link() -> %%%========================================================================= init([]) -> - %% OLD ssl - moved start to ssl.erl only if old - %% ssl is acctualy run! - %%Child1 = {ssl_server, {ssl_server, start_link, []}, - %% permanent, 2000, worker, [ssl_server]}, - - %% Does not start any port programs so it does matter - %% so much if it is not used! - %% Child2 = {ssl_broker_sup, {ssl_broker_sup, start_link, []}, - %% permanent, 2000, supervisor, [ssl_broker_sup]}, - - - %% New ssl SessionCertManager = session_and_cert_manager_child_spec(), - ConnetionManager = connection_manager_child_spec(), + TLSConnetionManager = tls_connection_manager_child_spec(), + %% Not supported yet + %%DTLSConnetionManager = tls_connection_manager_child_spec(), - {ok, {{one_for_all, 10, 3600}, [SessionCertManager, ConnetionManager]}}. + {ok, {{one_for_all, 10, 3600}, [SessionCertManager, TLSConnetionManager]}}. manager_opts() -> @@ -90,15 +80,23 @@ session_and_cert_manager_child_spec() -> Type = worker, {Name, StartFunc, Restart, Shutdown, Type, Modules}. -connection_manager_child_spec() -> - Name = ssl_connection, - StartFunc = {ssl_connection_sup, start_link, []}, +tls_connection_manager_child_spec() -> + Name = tls_connection, + StartFunc = {tls_connection_sup, start_link, []}, Restart = permanent, Shutdown = 4000, - Modules = [ssl_connection], + Modules = [tls_connection, ssl_connection], Type = supervisor, {Name, StartFunc, Restart, Shutdown, Type, Modules}. +dtls_connection_manager_child_spec() -> + Name = dtls_connection, + StartFunc = {dtls_connection_sup, start_link, []}, + Restart = permanent, + Shutdown = 4000, + Modules = [dtls_connection, ssl_connection], + Type = supervisor, + {Name, StartFunc, Restart, Shutdown, Type, Modules}. session_cb_init_args() -> case application:get_env(ssl, session_cb_init_args) of |