Skip to content

Commit b3b3b25

Browse files
committed
Revert change regarding ssl->options.cacheMessages
1 parent 1322c3c commit b3b3b25

3 files changed

Lines changed: 10 additions & 17 deletions

File tree

src/internal.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18566,12 +18566,8 @@ int DoHandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1856618566
((defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)) || \
1856718567
(defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
1856818568
(defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
18569-
if ((ssl->options.resuming || !ssl->options.verifyPeer ||
18570-
!IsAtLeastTLSv1_2(ssl) || IsAtLeastTLSv1_3(ssl->version))
18571-
#ifdef WOLFSSL_DTLS
18572-
&& !ssl->options.dtls
18573-
#endif
18574-
) {
18569+
if (ssl->options.resuming || !ssl->options.verifyPeer || \
18570+
!IsAtLeastTLSv1_2(ssl) || IsAtLeastTLSv1_3(ssl->version)) {
1857518571
#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
1857618572
if (ret != WC_NO_ERR_TRACE(WC_PENDING_E) &&
1857718573
ret != WC_NO_ERR_TRACE(OCSP_WANT_READ))

src/tls13.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6436,17 +6436,6 @@ static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
64366436
cookieData = cookie->data;
64376437
idx = OPAQUE8_LEN;
64386438

6439-
#ifdef WOLFSSL_DTLS13
6440-
/* Restore the HRR key share group from the cookie.
6441-
* Cookie Data = Hash Len (1B) | Hash | CS (2B) | KS Group (2B, optional)
6442-
*/
6443-
if (cookieDataSz == hashSz + 5) {
6444-
word16 keyShareGroup = 0;
6445-
ato16(cookieData + hashSz + 3, &keyShareGroup);
6446-
ssl->hrr_keyshare_group = keyShareGroup;
6447-
}
6448-
#endif /* WOLFSSL_DTLS13 */
6449-
64506439
/* Restart handshake hash with synthetic message hash. */
64516440
AddTls13HandShakeHeader(header, hashSz, 0, 0, message_hash, ssl);
64526441

@@ -6513,6 +6502,8 @@ static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
65136502
hrrIdx += 2;
65146503
c16toa(OPAQUE16_LEN, hrr + hrrIdx);
65156504
hrrIdx += 2;
6505+
/* Restore the HRR key share group from the cookie. */
6506+
ato16(cookieData + idx, &ssl->hrr_keyshare_group);
65166507
hrr[hrrIdx++] = cookieData[idx++];
65176508
hrr[hrrIdx++] = cookieData[idx++];
65186509
}

tests/api.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24180,6 +24180,12 @@ static word32 test_wolfSSL_dtls_stateless_HashWOLFSSL(const WOLFSSL* ssl)
2418024180
sslCopy.keys.dtls_peer_handshake_number = 0;
2418124181
XMEMSET(&sslCopy.alert_history, 0, sizeof(sslCopy.alert_history));
2418224182
sslCopy.hsHashes = NULL;
24183+
#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
24184+
((defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)) || \
24185+
(defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
24186+
(defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
24187+
sslCopy.options.cacheMessages = 0;
24188+
#endif
2418324189
#ifdef WOLFSSL_ASYNC_IO
2418424190
#ifdef WOLFSSL_ASYNC_CRYPT
2418524191
sslCopy.asyncDev = NULL;

0 commit comments

Comments
 (0)