forked from wolfSSL/wolfssl
Added a WOLFSSL_CIPHER_LIST_MAX_SIZE macro
This commit is contained in:
@ -1230,7 +1230,7 @@ static void Usage(void)
|
||||
|
||||
static void ShowCiphers(void)
|
||||
{
|
||||
char ciphers[4096];
|
||||
char ciphers[WOLFSSL_CIPHER_LIST_MAX_SIZE];
|
||||
|
||||
int ret = wolfSSL_get_ciphers(ciphers, (int)sizeof(ciphers));
|
||||
|
||||
@ -1368,12 +1368,11 @@ int bench_tls(void* args)
|
||||
}
|
||||
else {
|
||||
/* Run for each cipher */
|
||||
const int ciphersSz = 4096;
|
||||
ciphers = (char*)XMALLOC(ciphersSz, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
ciphers = (char*)XMALLOC(WOLFSSL_CIPHER_LIST_MAX_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (ciphers == NULL) {
|
||||
goto exit;
|
||||
}
|
||||
wolfSSL_get_ciphers(ciphers, ciphersSz);
|
||||
wolfSSL_get_ciphers(ciphers, (int)sizeof(ciphers));
|
||||
cipher = ciphers;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ static int NonBlockingSSL_Connect(WOLFSSL* ssl)
|
||||
|
||||
static void ShowCiphers(void)
|
||||
{
|
||||
static char ciphers[4096];
|
||||
static char ciphers[WOLFSSL_CIPHER_LIST_MAX_SIZE];
|
||||
|
||||
int ret = wolfSSL_get_ciphers(ciphers, (int)sizeof(ciphers));
|
||||
|
||||
|
@ -180,7 +180,7 @@ int testsuite_test(int argc, char** argv)
|
||||
|
||||
/* show ciphers */
|
||||
{
|
||||
char ciphers[1024*2];
|
||||
char ciphers[WOLFSSL_CIPHER_LIST_MAX_SIZE];
|
||||
XMEMSET(ciphers, 0, sizeof(ciphers));
|
||||
wolfSSL_get_ciphers(ciphers, sizeof(ciphers)-1);
|
||||
printf("ciphers = %s\n", ciphers);
|
||||
|
@ -155,6 +155,7 @@
|
||||
#pragma warning(disable:4244 4996)
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_CIPHER_LIST_MAX_SIZE 4096
|
||||
/* Buffer for benchmark tests */
|
||||
#ifndef TEST_BUFFER_SIZE
|
||||
#define TEST_BUFFER_SIZE 16384
|
||||
|
Reference in New Issue
Block a user