forked from wolfSSL/wolfssl
Fix for proper sizing of in-memory buffer for TLS benchmarking (32 is not always the max digest size).
This commit is contained in:
@ -28,6 +28,8 @@
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#include <wolfssl/wolfcrypt/hash.h> /* WC_MAX_DIGEST_SIZE */
|
||||
|
||||
#define WOLFSSL_DEBUG_MEMORY
|
||||
#ifdef WOLFSSL_DEBUG_MEMORY
|
||||
/* for memory debugging */
|
||||
@ -46,7 +48,8 @@
|
||||
#define BENCH_SHOW_PEER_INFO 1
|
||||
#define TEST_PACKET_SIZE (2 * 1024) /* TLS packet size */
|
||||
#define TEST_MAX_SIZE (32 * 1024) /* Total bytes to benchmark */
|
||||
#define MEM_BUFFER_SZ (TEST_PACKET_SIZE + 38 + 32) /* Must be large enough to handle max packet size plus max TLS header MAX_MSG_EXTRA */
|
||||
/* Must be large enough to handle max packet size - TLS header MAX_MSG_EXTRA + MAX DIGEST */
|
||||
#define MEM_BUFFER_SZ (TEST_PACKET_SIZE + 38 + WC_MAX_DIGEST_SIZE)
|
||||
#define SHOW_VERBOSE 0 /* Default output is tab delimited format */
|
||||
#ifndef WOLFSSL_CIPHER_LIST_MAX_SIZE
|
||||
#define WOLFSSL_CIPHER_LIST_MAX_SIZE 2048
|
||||
|
@ -40,7 +40,7 @@ bench_tls(args);
|
||||
#endif
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
#include <wolfssl/wolfcrypt/hash.h> /* WC_MAX_DIGEST_SIZE */
|
||||
#include <wolfssl/test.h>
|
||||
|
||||
#include <examples/benchmark/tls_bench.h>
|
||||
@ -107,7 +107,7 @@ bench_tls(args);
|
||||
|
||||
/* In memory transfer buffer maximum size */
|
||||
/* Must be large enough to handle max TLS packet size plus max TLS header MAX_MSG_EXTRA */
|
||||
#define MEM_BUFFER_SZ (TEST_PACKET_SIZE + 38 + 32)
|
||||
#define MEM_BUFFER_SZ (TEST_PACKET_SIZE + 38 + WC_MAX_DIGEST_SIZE)
|
||||
#define SHOW_VERBOSE 0 /* Default output is tab delimited format */
|
||||
|
||||
/* shutdown message - nice signal to server, we are done */
|
||||
|
Reference in New Issue
Block a user