Skip to content

Commit 29c2f15

Browse files
committed
Add #ifdef guards to cipher suite checks
1 parent c56ea55 commit 29c2f15

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37176,15 +37176,20 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
3717637176
if (first == TLS13_BYTE)
3717737177
return 1;
3717837178

37179+
#ifdef HAVE_NULL_CIPHER
3717937180
/* Special cases for integrity-only cipher suites */
3718037181
if (first == ECC_BYTE && (second == TLS_SHA256_SHA256 ||
3718137182
second == TLS_SHA384_SHA384))
3718237183
return 1;
37184+
#endif
3718337185

37186+
#if (defined(WOLFSSL_SM4_GCM) || defined(WOLFSSL_SM4_CCM)) && \
37187+
defined(WOLFSSL_SM3)
3718437188
/* SM4 cipher suites for TLS 1.3 */
3718537189
if (first == CIPHER_BYTE && (second == TLS_SM4_GCM_SM3 ||
3718637190
second == TLS_SM4_CCM_SM3))
3718737191
return 1;
37192+
#endif
3718837193

3718937194
return 0;
3719037195
}

0 commit comments

Comments
 (0)