This buffer should only be generated at the start of the session.
Re-generating it on resend of ClientHello will desynchronize the session
between the client and server, resulting in the server refusing the
client's connection due to a hash mismatch in the Finished handshake
message.
lock (this.syncRoot)
{
this.ResetConnectionState();
+ this.nextEpoch.ClientRandom.FillWithRandom(this.random);
this.SendClientHello();
}
helloVerifyRequest.Cookie.CopyTo(this.nextEpoch.Cookie);
// Restart the handshake
+ this.nextEpoch.ClientRandom.FillWithRandom(this.random);
this.SendClientHello();
break;
{
// Reset our verification stream
this.nextEpoch.VerificationStream.SetLength(0);
- this.nextEpoch.ClientRandom.FillWithRandom(this.random);
// Describe our ClientHello flight
ClientHello clientHello = new ClientHello();