aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_handshake_1_3.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-12-06 15:52:53 +0100
committerPéter Dimitrov <[email protected]>2019-01-11 09:59:12 +0100
commit40a832093a95aac9bc171616b9f11adf108419c0 (patch)
tree6295b53c8b55729fa80ef85c929d9a3b9ac632b5 /lib/ssl/src/tls_handshake_1_3.erl
parent32bf81eb7bcb42754130fce7029e741fcf022e4c (diff)
downloadotp-40a832093a95aac9bc171616b9f11adf108419c0.tar.gz
otp-40a832093a95aac9bc171616b9f11adf108419c0.tar.bz2
otp-40a832093a95aac9bc171616b9f11adf108419c0.zip
ssl: Calculate handshake traffic keys
Change-Id: Ifdf8978c58c15313e8a7973cff97dda3458f7721
Diffstat (limited to 'lib/ssl/src/tls_handshake_1_3.erl')
-rw-r--r--lib/ssl/src/tls_handshake_1_3.erl9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/ssl/src/tls_handshake_1_3.erl b/lib/ssl/src/tls_handshake_1_3.erl
index 4c18e76ad9..0d6ebe953f 100644
--- a/lib/ssl/src/tls_handshake_1_3.erl
+++ b/lib/ssl/src/tls_handshake_1_3.erl
@@ -50,8 +50,7 @@ server_hello(SessionId, KeyShare, ConnectionStates, _Map) ->
Extensions = server_hello_extensions(KeyShare),
#server_hello{server_version = {3,3}, %% legacy_version
cipher_suite = SecParams#security_parameters.cipher_suite,
- compression_method =
- SecParams#security_parameters.compression_algorithm,
+ compression_method = 0, %% legacy attribute
random = SecParams#security_parameters.server_random,
session_id = SessionId,
extensions = Extensions
@@ -198,7 +197,6 @@ extensions_list(HelloExtensions) ->
%%====================================================================
handle_client_hello(#client_hello{cipher_suites = ClientCiphers,
- random = Random,
session_id = SessionId,
extensions = Extensions} = _Hello,
#ssl_options{ciphers = ServerCiphers,
@@ -233,7 +231,7 @@ handle_client_hello(#client_hello{cipher_suites = ClientCiphers,
Cipher = Maybe(select_cipher_suite(ClientCiphers, ServerCiphers)),
Group = Maybe(select_server_group(ServerGroups, ClientGroups)),
Maybe(validate_key_share(ClientGroups, ClientShares)),
- _ClientPubKey = Maybe(get_client_public_key(Group, ClientShares)),
+ ClientPubKey = Maybe(get_client_public_key(Group, ClientShares)),
%% Handle certificate
{PublicKeyAlgo, SignAlgo} = get_certificate_params(Cert),
@@ -250,9 +248,8 @@ handle_client_hello(#client_hello{cipher_suites = ClientCiphers,
_Ret = #{cipher => Cipher,
group => Group,
sign_alg => SelectedSignAlg,
- %% client_share => ClientPubKey,
+ client_share => ClientPubKey,
key_share => KeyShare,
- client_random => Random,
session_id => SessionId}
%% TODO: