diff options
author | Ingela Anderton Andin <[email protected]> | 2018-09-11 18:14:23 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-09-27 16:59:14 +0200 |
commit | 973169ab1e1b79e6ef006ec25eb81c84ac0be34a (patch) | |
tree | 472a2a9890de0f8f3eb7bf96996b69202dbb9485 /lib/ssl/src/tls_connection.erl | |
parent | 08ef38b2c9f84ed118e693bff38efa69fc2c7eb8 (diff) | |
download | otp-973169ab1e1b79e6ef006ec25eb81c84ac0be34a.tar.gz otp-973169ab1e1b79e6ef006ec25eb81c84ac0be34a.tar.bz2 otp-973169ab1e1b79e6ef006ec25eb81c84ac0be34a.zip |
ssl: Generalize extensions handling
As TLS 1.3 introduces more extensions in other places than in hello messages
we like to have generalize extension handling encode/decode with some
hello wrappers.
Also extend property tests of handshake encod/decode
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r-- | lib/ssl/src/tls_connection.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index 94a4fa511d..f85e00ea50 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -341,8 +341,8 @@ reinit_handshake_data(State) -> tls_handshake_history = ssl_handshake:init_handshake_history() }. -select_sni_extension(#client_hello{extensions = HelloExtensions}) -> - HelloExtensions#hello_extensions.sni; +select_sni_extension(#client_hello{extensions = #{sni := SNI}}) -> + SNI; select_sni_extension(_) -> undefined. @@ -517,13 +517,13 @@ hello(internal, #client_hello{extensions = Extensions} = Hello, start_or_recv_from = From} = State) -> {next_state, user_hello, State#state{start_or_recv_from = undefined, hello = Hello}, - [{reply, From, {ok, ssl_connection:map_extensions(Extensions)}}]}; + [{reply, From, {ok, Extensions}}]}; hello(internal, #server_hello{extensions = Extensions} = Hello, #state{ssl_options = #ssl_options{handshake = hello}, start_or_recv_from = From} = State) -> {next_state, user_hello, State#state{start_or_recv_from = undefined, hello = Hello}, - [{reply, From, {ok, ssl_connection:map_extensions(Extensions)}}]}; + [{reply, From, {ok, Extensions}}]}; hello(internal, #client_hello{client_version = ClientVersion} = Hello, #state{connection_states = ConnectionStates0, port = Port, session = #session{own_certificate = Cert} = Session0, |