Fix for proper sizing of in-memory buffer for TLS benchmarking (32 is not always the max digest size).

This commit is contained in:
David Garske
2019-11-18 10:34:15 -08:00
parent 12d2d17d18
commit cb9f16d3cb
2 changed files with 6 additions and 3 deletions

View File

@@ -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 */