Skip to content

Commit efc3665

Browse files
committed
src/internal.c: add pedantic-compatible NO_TLS codepath for cipher_names[] and GetCipherNamesSize().
1 parent 4572dcf commit efc3665

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/internal.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27090,6 +27090,7 @@ void SetErrorString(int error, char* str)
2709027090
#endif
2709127091
#endif /* NO_CIPHER_SUITE_ALIASES */
2709227092

27093+
#ifndef NO_TLS
2709327094
static const CipherSuiteInfo cipher_names[] =
2709427095
{
2709527096

@@ -27569,6 +27570,14 @@ static const CipherSuiteInfo cipher_names[] =
2756927570
#endif /* WOLFSSL_NO_TLS12 */
2757027571
};
2757127572

27573+
#else /* NO_TLS */
27574+
27575+
static const CipherSuiteInfo cipher_names[] =
27576+
{
27577+
SUITE_INFO("NO-TLS","NO-TLS", 0, 0, 0, 0),
27578+
};
27579+
27580+
#endif /* NO_TLS */
2757227581

2757327582
/* returns the cipher_names array */
2757427583
const CipherSuiteInfo* GetCipherNames(void)
@@ -27580,7 +27589,11 @@ const CipherSuiteInfo* GetCipherNames(void)
2758027589
/* returns the number of elements in the cipher_names array */
2758127590
int GetCipherNamesSize(void)
2758227591
{
27592+
#ifdef NO_TLS
27593+
return 0;
27594+
#else
2758327595
return (int)(sizeof(cipher_names) / sizeof(CipherSuiteInfo));
27596+
#endif
2758427597
}
2758527598

2758627599

0 commit comments

Comments
 (0)