mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
benchmark.c fixes for NO_MAIN_DRIVER, const arrays
This commit is contained in:
@@ -206,7 +206,8 @@ static int bench_asym_algs = 0;
|
|||||||
/* Other cryptographic algorithms to benchmark. */
|
/* Other cryptographic algorithms to benchmark. */
|
||||||
static int bench_other_algs = 0;
|
static int bench_other_algs = 0;
|
||||||
|
|
||||||
#ifndef WOLFSSL_BENCHMARK_ALL
|
#if !defined(WOLFSSL_BENCHMARK_ALL) && !defined(NO_MAIN_DRIVER)
|
||||||
|
|
||||||
/* The mapping of command line option to bit values. */
|
/* The mapping of command line option to bit values. */
|
||||||
typedef struct bench_alg {
|
typedef struct bench_alg {
|
||||||
/* Command line option string. */
|
/* Command line option string. */
|
||||||
@@ -215,8 +216,8 @@ typedef struct bench_alg {
|
|||||||
int val;
|
int val;
|
||||||
} bench_alg;
|
} bench_alg;
|
||||||
|
|
||||||
/* All recoginized cipher algorithm choosing command line options. */
|
/* All recognized cipher algorithm choosing command line options. */
|
||||||
static bench_alg bench_cipher_opt[] = {
|
static const bench_alg bench_cipher_opt[] = {
|
||||||
{ "-cipher", -1 },
|
{ "-cipher", -1 },
|
||||||
#ifdef HAVE_AES_CBC
|
#ifdef HAVE_AES_CBC
|
||||||
{ "-aes_cbc", BENCH_AES_CBC },
|
{ "-aes_cbc", BENCH_AES_CBC },
|
||||||
@@ -263,8 +264,8 @@ static bench_alg bench_cipher_opt[] = {
|
|||||||
{ NULL, 0}
|
{ NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* All recoginized digest algorithm choosing command line options. */
|
/* All recognized digest algorithm choosing command line options. */
|
||||||
static bench_alg bench_digest_opt[] = {
|
static const bench_alg bench_digest_opt[] = {
|
||||||
{ "-digest", -1 },
|
{ "-digest", -1 },
|
||||||
#ifndef NO_MD5
|
#ifndef NO_MD5
|
||||||
{ "-md5", BENCH_MD5 },
|
{ "-md5", BENCH_MD5 },
|
||||||
@@ -315,8 +316,8 @@ static bench_alg bench_digest_opt[] = {
|
|||||||
{ NULL, 0}
|
{ NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* All recoginized MAC algorithm choosing command line options. */
|
/* All recognized MAC algorithm choosing command line options. */
|
||||||
static bench_alg bench_mac_opt[] = {
|
static const bench_alg bench_mac_opt[] = {
|
||||||
{ "-mac", -1 },
|
{ "-mac", -1 },
|
||||||
#ifdef WOLFSSL_CMAC
|
#ifdef WOLFSSL_CMAC
|
||||||
{ "-cmac", BENCH_CMAC },
|
{ "-cmac", BENCH_CMAC },
|
||||||
@@ -345,8 +346,8 @@ static bench_alg bench_mac_opt[] = {
|
|||||||
{ NULL, 0}
|
{ NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* All recoginized asymmetric algorithm choosing command line options. */
|
/* All recognized asymmetric algorithm choosing command line options. */
|
||||||
static bench_alg bench_asym_opt[] = {
|
static const bench_alg bench_asym_opt[] = {
|
||||||
{ "-asym", -1 },
|
{ "-asym", -1 },
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
#ifdef WOLFSSL_KEY_GEN
|
#ifdef WOLFSSL_KEY_GEN
|
||||||
@@ -381,9 +382,9 @@ static bench_alg bench_asym_opt[] = {
|
|||||||
{ NULL, 0}
|
{ NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* All recoginized other cryptographic algorithm choosing command line options.
|
/* All recognized other cryptographic algorithm choosing command line options.
|
||||||
*/
|
*/
|
||||||
static bench_alg bench_other_opt[] = {
|
static const bench_alg bench_other_opt[] = {
|
||||||
{ "-other", -1 },
|
{ "-other", -1 },
|
||||||
#ifndef WC_NO_RNG
|
#ifndef WC_NO_RNG
|
||||||
{ "-rng", BENCH_RNG },
|
{ "-rng", BENCH_RNG },
|
||||||
|
Reference in New Issue
Block a user