aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_handshake.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-09-06 15:49:12 +0200
committerIngela Anderton Andin <[email protected]>2016-09-06 15:49:12 +0200
commitb0d29cc77f3c8d4d63dabb2f00570b0130f9f175 (patch)
treecbc19b39413ef5cf12d1630d3a6def9b1e9f1ccd /lib/ssl/src/tls_handshake.erl
parent08ff462b9302f62aafa20c1978d5ca148f03cdd3 (diff)
parent01e9582332fd17aad51a8b6a4212f72387699359 (diff)
downloadotp-b0d29cc77f3c8d4d63dabb2f00570b0130f9f175.tar.gz
otp-b0d29cc77f3c8d4d63dabb2f00570b0130f9f175.tar.bz2
otp-b0d29cc77f3c8d4d63dabb2f00570b0130f9f175.zip
Merge branch 'ingela/ssl/dtls-progress/connection-states-as-maps' into maint
* ingela/ssl/dtls-progress/connection-states-as-maps: dtls: fix encoding of client hello cookie dtls: Prepare start of DTLS connection manager with SSL app ssl: Refactor to use maps for the connection states ssl, dtls: Refactor sni handling dtls: Add close/5 dtls: Add renegotiate/2 dtls: Add protocol event handling ssl: Refactor code so that tls and dtls can share more code ssl, dtls: Disable V2 compatibility clause from ssl_handshake:update_handshake_history ssl: Make sure common code for TLS and DTLS uses the TLS Version ssl: remove unused RecordCB argument from master_secret dtls: Add reinit_handshake_data/1 to dtls dtls: replace tls_record with RecordCB in connection_info Fix version numbers and dependencies
Diffstat (limited to 'lib/ssl/src/tls_handshake.erl')
-rw-r--r--lib/ssl/src/tls_handshake.erl13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 6e593950d9..a2486bf752 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -41,7 +41,7 @@
%% Internal application API
%%====================================================================
%%--------------------------------------------------------------------
--spec client_hello(host(), inet:port_number(), #connection_states{},
+-spec client_hello(host(), inet:port_number(), ssl_record:connection_states(),
#ssl_options{}, integer(), atom(), boolean(), der_cert()) ->
#client_hello{}.
%%
@@ -54,8 +54,7 @@ client_hello(Host, Port, ConnectionStates,
} = SslOpts,
Cache, CacheCb, Renegotiation, OwnCert) ->
Version = tls_record:highest_protocol_version(Versions),
- Pending = ssl_record:pending_connection_state(ConnectionStates, read),
- SecParams = Pending#connection_state.security_parameters,
+ #{security_parameters := SecParams} = ssl_record:pending_connection_state(ConnectionStates, read),
AvailableCipherSuites = ssl_handshake:available_suites(UserSuites, Version),
Extensions = ssl_handshake:client_hello_extensions(Host, Version,
AvailableCipherSuites,
@@ -78,14 +77,14 @@ client_hello(Host, Port, ConnectionStates,
%%--------------------------------------------------------------------
-spec hello(#server_hello{} | #client_hello{}, #ssl_options{},
- #connection_states{} | {inet:port_number(), #session{}, db_handle(),
- atom(), #connection_states{},
+ ssl_record:connection_states() | {inet:port_number(), #session{}, db_handle(),
+ atom(), ssl_record:connection_states(),
binary() | undefined, ssl_cipher:key_algo()},
boolean()) ->
{tls_record:tls_version(), session_id(),
- #connection_states{}, alpn | npn, binary() | undefined}|
+ ssl_record:connection_states(), alpn | npn, binary() | undefined}|
{tls_record:tls_version(), {resumed | new, #session{}},
- #connection_states{}, binary() | undefined,
+ ssl_record:connection_states(), binary() | undefined,
#hello_extensions{}, {ssl_cipher:hash(), ssl_cipher:sign_algo()} | undefined} |
#alert{}.
%%