Skip to content

Commit

Permalink
fix for async build
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Aug 26, 2024
1 parent cac724e commit 0dffc98
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ static const byte tls13Downgrade[7] = {
0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44
};
#define TLS13_DOWNGRADE_SZ sizeof(tls13Downgrade)

#endif /* !NO_WOLFSSL_SERVER || !NO_WOLFSSL_CLIENT */

#if !defined(NO_OLD_TLS) && !defined(WOLFSSL_AEAD_ONLY)
Expand Down Expand Up @@ -2418,7 +2419,7 @@ int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap)
}
#endif

#ifdef WOLF_CRYPTO_CB
#if defined(WOLF_CRYPTO_CB) || defined(WOLFSSL_ASYNC_CRYPT)
#ifdef WOLFSSL_QNX_CAAM
/* default to try using CAAM when built */
ctx->devId = WOLFSSL_CAAM_DEVID;
Expand Down Expand Up @@ -34226,15 +34227,13 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ret != 0)
return ret;

#ifdef WOLFSSL_TLS13
if (TLSv1_3_Capable(ssl)) {
/* TLS v1.3 capable server downgraded. */
XMEMCPY(output + idx + RAN_LEN - (TLS13_DOWNGRADE_SZ + 1),
tls13Downgrade, TLS13_DOWNGRADE_SZ);
output[idx + RAN_LEN - 1] = (byte)IsAtLeastTLSv1_2(ssl);
}
else
#endif
if (ssl->ctx->method->version.major == SSLv3_MAJOR &&
ssl->ctx->method->version.minor == TLSv1_2_MINOR &&
(wolfSSL_get_options(ssl) & WOLFSSL_OP_NO_TLSv1_2) == 0 &&
Expand Down

0 comments on commit 0dffc98

Please sign in to comment.