diff options
author | Ingela Anderton Andin <[email protected]> | 2019-02-08 16:47:16 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-02-08 16:47:16 +0100 |
commit | dcce921e494f4a54341da54c1c8f98ae5941ba00 (patch) | |
tree | 1e33a481f0b9cc08867eceb38e48cab64214f221 | |
parent | 098852f7ee518fc1bd5a936ecc8baa5dfc118149 (diff) | |
download | otp-dcce921e494f4a54341da54c1c8f98ae5941ba00.tar.gz otp-dcce921e494f4a54341da54c1c8f98ae5941ba00.tar.bz2 otp-dcce921e494f4a54341da54c1c8f98ae5941ba00.zip |
ssl: srp
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 7 | ||||
-rw-r--r-- | lib/ssl/src/ssl_connection.hrl | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 179ad67940..293f6d70bd 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -1434,7 +1434,6 @@ format_status(terminate, [_, StateName, State]) -> connection_env = ?SECRET_PRINTOUT, session = ?SECRET_PRINTOUT, diffie_hellman_keys = ?SECRET_PRINTOUT, - srp_params = ?SECRET_PRINTOUT, srp_keys = ?SECRET_PRINTOUT, ssl_options = NewOptions, flight_buffer = ?SECRET_PRINTOUT} @@ -1695,7 +1694,7 @@ certify_client_key_exchange(#client_rsa_psk_identity{} = ClientKey, PremasterSecret = ssl_handshake:premaster_secret(ClientKey, Key, PSKLookup), calculate_master_secret(PremasterSecret, State0, Connection, certify, cipher); certify_client_key_exchange(#client_srp_public{} = ClientKey, - #state{srp_params = Params, + #state{handshake_env = #handshake_env{srp_params = Params}, srp_keys = Key } = State0, Connection) -> PremasterSecret = ssl_handshake:premaster_secret(ClientKey, Key, Params), @@ -1878,8 +1877,8 @@ key_exchange(#state{static_env = #static_env{role = server}, kex_algorithm = Kex HashSignAlgo, ClientRandom, ServerRandom, PrivateKey}), - State = Connection:queue_handshake(Msg, State0), - State#state{srp_params = SrpParams, + #state{handshake_env = HsEnv} = State = Connection:queue_handshake(Msg, State0), + State#state{handshake_env = HsEnv#handshake_env{srp_params = SrpParams}, srp_keys = Keys}; key_exchange(#state{static_env = #static_env{role = client}, handshake_env = #handshake_env{public_key_info = PublicKeyInfo, diff --git a/lib/ssl/src/ssl_connection.hrl b/lib/ssl/src/ssl_connection.hrl index 15aec8dbf0..1e4907661a 100644 --- a/lib/ssl/src/ssl_connection.hrl +++ b/lib/ssl/src/ssl_connection.hrl @@ -70,6 +70,7 @@ cert_hashsign_algorithm = {undefined, undefined}, %% key exchange diffie_hellman_params:: #'DHParameter'{} | undefined | secret_printout(), + srp_params :: #srp_user{} | secret_printout() | 'undefined', public_key_info :: ssl_handshake:public_key_info() | 'undefined', premaster_secret :: binary() | secret_printout() | 'undefined', server_psk_identity :: binary() | 'undefined' % server psk identity hint @@ -102,8 +103,7 @@ flight_buffer = [] :: list() | map(), kex_algorithm :: ssl:key_algo(), client_certificate_requested = false :: boolean(), - diffie_hellman_keys :: {PublicKey :: binary(), PrivateKey :: binary()} | #'ECPrivateKey'{} | undefined | secret_printout(), - srp_params :: #srp_user{} | secret_printout() | 'undefined', + diffie_hellman_keys :: {PublicKey :: binary(), PrivateKey :: binary()} | #'ECPrivateKey'{} | undefined | secret_printout(), srp_keys ::{PublicKey :: binary(), PrivateKey :: binary()} | secret_printout() | 'undefined', protocol_specific = #{} :: map(), session :: #session{} | secret_printout(), |