diff --git a/ctaocrypt/benchmark/benchmark.c b/ctaocrypt/benchmark/benchmark.c index 72503131b..1cf051874 100644 --- a/ctaocrypt/benchmark/benchmark.c +++ b/ctaocrypt/benchmark/benchmark.c @@ -219,17 +219,21 @@ int benchmark_test(void *args) #ifdef BENCH_EMBEDDED -static const int numBlocks = 25; /* how many kB/megs to test (en/de)cryption */ -static const char blockType[] = "kB"; /* used in printf output */ -static const int ntimes = 1; /* public key iterations */ -static const int genTimes = 5; -static const int agreeTimes = 5; +enum BenchmarkBounds { + numBlocks = 25, /* how many kB to test (en/de)cryption */ + ntimes = 1, + genTimes = 5, /* public key iterations */ + agreeTimes = 5 +}; +static const char blockType[] = "kB"; /* used in printf output */ #else -static const int numBlocks = 5; -static const char blockType[] = "megs"; -static const int ntimes = 100; -static const int genTimes = 100; -static const int agreeTimes = 100; +enum BenchmarkBounds { + numBlocks = 5, /* how many megs to test (en/de)cryption */ + ntimes = 100, + genTimes = 100, + agreeTimes = 100 +}; +static const char blockType[] = "megs"; /* used in printf output */ #endif static const byte key[] = diff --git a/src/ssl.c b/src/ssl.c index 8bd06a7e7..02ffff6e3 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1157,6 +1157,8 @@ int CyaSSL_CertPemToDer(const unsigned char* pem, int pemSz, } +#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) + /* our KeyPemToDer password callback, password in userData */ static INLINE int OurPasswordCb(char* passwd, int sz, int rw, void* userdata) { @@ -1169,6 +1171,8 @@ static INLINE int OurPasswordCb(char* passwd, int sz, int rw, void* userdata) return min((word32)sz, (word32)XSTRLEN((char*)userdata)); } +#endif /* OPENSSL_EXTRA || HAVE_WEBSERVER */ + /* Return bytes written to buff or < 0 for error */ int CyaSSL_KeyPemToDer(const unsigned char* pem, int pemSz, unsigned char* buff,