diff options
author | Ingela Anderton Andin <[email protected]> | 2012-05-08 15:36:21 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2012-06-08 16:52:05 +0200 |
commit | c7cdcb85f8116dda47c2960df1c8a3f3caf56d64 (patch) | |
tree | 136ef0c503061fe9c1f3050df71bd98ae06a99a1 /lib/ssl/src/ssl_manager.erl | |
parent | a0981bf885a99cce1dee1775378d56eb661eec27 (diff) | |
download | otp-c7cdcb85f8116dda47c2960df1c8a3f3caf56d64.tar.gz otp-c7cdcb85f8116dda47c2960df1c8a3f3caf56d64.tar.bz2 otp-c7cdcb85f8116dda47c2960df1c8a3f3caf56d64.zip |
ssl: Move and avoid ets:select bottleneck in client
Do not use ssl_manager process for selecting an id. It's unnecessary
to involve the manager process at all on the client side.
Diffstat (limited to 'lib/ssl/src/ssl_manager.erl')
-rw-r--r-- | lib/ssl/src/ssl_manager.erl | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/ssl/src/ssl_manager.erl b/lib/ssl/src/ssl_manager.erl index 6389ff03f5..6d0d010e10 100644 --- a/lib/ssl/src/ssl_manager.erl +++ b/lib/ssl/src/ssl_manager.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2007-2011. All Rights Reserved. +%% Copyright Ericsson AB 2007-2012. 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 @@ -30,7 +30,7 @@ -export([start_link/1, start_link_dist/1, connection_init/2, cache_pem_file/2, lookup_trusted_cert/4, - client_session_id/4, server_session_id/4, + server_session_id/4, register_session/2, register_session/3, invalidate_session/2, invalidate_session/3]). @@ -114,15 +114,6 @@ lookup_trusted_cert(DbHandle, Ref, SerialNumber, Issuer) -> ssl_certificate_db:lookup_trusted_cert(DbHandle, Ref, SerialNumber, Issuer). %%-------------------------------------------------------------------- --spec client_session_id(host(), inet:port_number(), #ssl_options{}, - der_cert() | undefined) -> session_id(). -%% -%% Description: Select a session id for the client. -%%-------------------------------------------------------------------- -client_session_id(Host, Port, SslOpts, OwnCert) -> - call({client_session_id, Host, Port, SslOpts, OwnCert}). - -%%-------------------------------------------------------------------- -spec server_session_id(host(), inet:port_number(), #ssl_options{}, der_cert()) -> session_id(). %% @@ -215,12 +206,6 @@ handle_call({{connection_init, Trustedcerts, _Role}, Pid}, _From, end, {reply, Result, State}; -handle_call({{client_session_id, Host, Port, SslOpts, OwnCert}, _}, _, - #state{session_cache = Cache, - session_cache_cb = CacheCb} = State) -> - Id = ssl_session:id({Host, Port, SslOpts}, Cache, CacheCb, OwnCert), - {reply, Id, State}; - handle_call({{server_session_id, Port, SuggestedSessionId, SslOpts, OwnCert}, _}, _, #state{session_cache_cb = CacheCb, session_cache = Cache, |