aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tls/finished.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tls/finished.cpp b/src/tls/finished.cpp
index 2eec244f2..ecb7c315a 100644
--- a/src/tls/finished.cpp
+++ b/src/tls/finished.cpp
@@ -39,14 +39,16 @@ MemoryVector<byte> finished_compute_verify(TLS_Handshake_State* state,
const byte SSL_CLIENT_LABEL[] = { 0x43, 0x4C, 0x4E, 0x54 };
const byte SSL_SERVER_LABEL[] = { 0x53, 0x52, 0x56, 0x52 };
+ TLS_Handshake_Hash hash = state->hash; // don't modify state
+
MemoryVector<byte> ssl3_finished;
if(side == CLIENT)
- state->hash.update(SSL_CLIENT_LABEL, sizeof(SSL_CLIENT_LABEL));
+ hash.update(SSL_CLIENT_LABEL, sizeof(SSL_CLIENT_LABEL));
else
- state->hash.update(SSL_SERVER_LABEL, sizeof(SSL_SERVER_LABEL));
+ hash.update(SSL_SERVER_LABEL, sizeof(SSL_SERVER_LABEL));
- return state->hash.final_ssl3(state->keys.master_secret());
+ return hash.final_ssl3(state->keys.master_secret());
}
else
{