diff options
author | lloyd <[email protected]> | 2010-04-23 21:22:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-04-23 21:22:24 +0000 |
commit | 6c7b8d1d86e669067720c5290d5e4dfe5d904012 (patch) | |
tree | de086a4eba492d9e021d8442038b983dc35cee54 | |
parent | 76ee8b28fca005a35067cc1dbd82290ca9324552 (diff) |
Add the other parties Random value to the local PRNG state
-rw-r--r-- | src/ssl/tls_client.cpp | 2 | ||||
-rw-r--r-- | src/ssl/tls_server.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/ssl/tls_client.cpp b/src/ssl/tls_client.cpp index f12dccd69..bb00886b4 100644 --- a/src/ssl/tls_client.cpp +++ b/src/ssl/tls_client.cpp @@ -405,6 +405,8 @@ void TLS_Client::process_handshake_msg(Handshake_Type type, state->version = state->server_hello->version(); + rng.add_entropy_vec(state->server_hello->random()); + if(state->version > state->client_hello->version()) throw TLS_Exception(HANDSHAKE_FAILURE, "TLS_Client: Server replied with bad version"); diff --git a/src/ssl/tls_server.cpp b/src/ssl/tls_server.cpp index 1c8d28c95..a6e1a8758 100644 --- a/src/ssl/tls_server.cpp +++ b/src/ssl/tls_server.cpp @@ -348,6 +348,8 @@ void TLS_Server::process_handshake_msg(Handshake_Type type, state->client_hello = new Client_Hello(contents, type); + rng.add_entropy_vec(state->client_hello->random()); + client_requested_hostname = state->client_hello->hostname(); state->version = choose_version(state->client_hello->version(), |