Skip to content

Commit

Permalink
Bug 1387306 - Restart the hashes more consistently, r=ekr
Browse files Browse the repository at this point in the history
--HG--
branch : NSS_TLS13_DRAFT19_BRANCH
extra : amend_source : e006f4cc0478bf1441c618e88dc9a5157ff2f84c
  • Loading branch information
martinthomson committed Aug 2, 2017
1 parent da7b6f8 commit 0115a13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 2 additions & 3 deletions lib/ssl/ssl3con.c
Expand Up @@ -11666,9 +11666,8 @@ ssl3_HandleHandshakeMessage(sslSocket *ss, PRUint8 *b, PRUint32 length,
SSL_TRC(30, ("%d: SSL3[%d]: handle handshake message: %s", SSL_GETPID(),
ss->fd, ssl3_DecodeHandshakeType(ss->ssl3.hs.msg_type)));

/* Start new handshake hashes when we start a new handshake. Unless this is
* TLS 1.3 and we sent a HelloRetryRequest. */
if (ss->ssl3.hs.msg_type == ssl_hs_client_hello && !ss->ssl3.hs.helloRetry) {
/* Start new handshake hashes when we start a new handshake. */
if (ss->ssl3.hs.msg_type == ssl_hs_client_hello) {
ssl3_RestartHandshakeHashes(ss);
}
switch (ss->ssl3.hs.msg_type) {
Expand Down
4 changes: 0 additions & 4 deletions lib/ssl/tls13con.c
Expand Up @@ -1639,10 +1639,6 @@ tls13_SendHelloRetryRequest(sslSocket *ss, const sslNamedGroupDef *selectedGroup
ss->ssl3.hs.zeroRttIgnore = ssl_0rtt_ignore_hrr;
}

/* Restart the handshake hashes because we will refresh them when we
* get ClientHello2 again. */
ssl3_RestartHandshakeHashes(ss);

return SECSuccess;

loser:
Expand Down

0 comments on commit 0115a13

Please sign in to comment.