diff options
author | lloyd <[email protected]> | 2011-12-29 02:41:53 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-12-29 02:41:53 +0000 |
commit | caa9dfa12cf69bb4ab88c399e61e856fedb24900 (patch) | |
tree | 2df3665d97199c4150515667e89272679210f069 /src/tls/tls_server.cpp | |
parent | 6432abc730f65328affb4f0ca7c0116b3ded353f (diff) |
Clean up the ordering of constructor args to the various message types
Diffstat (limited to 'src/tls/tls_server.cpp')
-rw-r--r-- | src/tls/tls_server.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/tls/tls_server.cpp b/src/tls/tls_server.cpp index 16bf554d3..090a55566 100644 --- a/src/tls/tls_server.cpp +++ b/src/tls/tls_server.cpp @@ -167,13 +167,13 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, { // resume session state->server_hello = new Server_Hello( - rng, writer, + state->hash, + rng, session_info.session_id(), session_info.ciphersuite(), session_info.compression_method(), - Version_Code(session_info.version()), - state->hash); + Version_Code(session_info.version())); state->suite = CipherSuite(state->server_hello->ciphersuite()); @@ -187,31 +187,32 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, writer.set_keys(state->suite, state->keys, SERVER); - state->server_finished = new Finished(writer, state->version, SERVER, - state->keys.master_secret(), - state->hash); + state->server_finished = new Finished(writer, state->hash, + state->version, SERVER, + state->keys.master_secret()); state->set_expected_next(HANDSHAKE_CCS); } else // new session { state->server_hello = new Server_Hello( - rng, writer, + state->hash, policy, + rng, cert_chain, *(state->client_hello), rng.random_vec(32), - state->version, - state->hash); + state->version); state->suite = CipherSuite(state->server_hello->ciphersuite()); if(state->suite.sig_type() != TLS_ALGO_SIGNER_ANON) { // FIXME: should choose certs based on sig type - state->server_certs = new Certificate(writer, cert_chain, - state->hash); + state->server_certs = new Certificate(writer, + state->hash, + cert_chain); } if(state->suite.kex_type() == TLS_ALGO_KEYEXCH_NOKEX) @@ -231,11 +232,10 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, throw Internal_Error("TLS_Server: Unknown ciphersuite kex type"); state->server_kex = - new Server_Key_Exchange(rng, writer, + new Server_Key_Exchange(writer, state->hash, rng, state->kex_priv, private_key, state->client_hello->random(), - state->server_hello->random(), - state->hash); + state->server_hello->random()); if(policy.require_client_auth()) { @@ -339,9 +339,9 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, writer.set_keys(state->suite, state->keys, SERVER); - state->server_finished = new Finished(writer, state->version, SERVER, - state->keys.master_secret(), - state->hash); + state->server_finished = new Finished(writer, state->hash, + state->version, SERVER, + state->keys.master_secret()); std::vector<X509_Certificate> peer_certs; |