forked from wolfSSL/wolfssl
Merge pull request #1293 from dgarske/bench_emb
Fix for building with `BENCH_EMBEDDED`
This commit is contained in:
@ -80,9 +80,13 @@ extern "C" {
|
|||||||
//#define RSA_LOW_MEM
|
//#define RSA_LOW_MEM
|
||||||
|
|
||||||
/* Enables blinding mode, to prevent timing attacks */
|
/* Enables blinding mode, to prevent timing attacks */
|
||||||
#undef WC_RSA_BLINDING
|
#if 1
|
||||||
#define WC_RSA_BLINDING
|
#undef WC_RSA_BLINDING
|
||||||
|
#define WC_RSA_BLINDING
|
||||||
|
#else
|
||||||
|
#undef WC_NO_HARDEN
|
||||||
|
#define WC_NO_HARDEN
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define NO_RSA
|
#define NO_RSA
|
||||||
#endif
|
#endif
|
||||||
@ -200,6 +204,8 @@ extern "C" {
|
|||||||
/* Sha256 */
|
/* Sha256 */
|
||||||
#undef NO_SHA256
|
#undef NO_SHA256
|
||||||
#if 1
|
#if 1
|
||||||
|
/* not unrolled - ~2k smaller and ~25% slower */
|
||||||
|
#define USE_SLOW_SHA256
|
||||||
#else
|
#else
|
||||||
#define NO_SHA256
|
#define NO_SHA256
|
||||||
#endif
|
#endif
|
||||||
@ -216,7 +222,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* over twice as small, but 50% slower */
|
/* over twice as small, but 50% slower */
|
||||||
#define USE_SLOW_SHA2
|
#define USE_SLOW_SHA512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* MD5 */
|
/* MD5 */
|
||||||
|
@ -105,4 +105,4 @@ $(BUILD_DIR)/$(BIN).a: $(OBJS_ASM) $(OBJS_C)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
|
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
|
||||||
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm
|
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.a $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "user_settings.h"
|
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
#include <wolfssl/wolfcrypt/random.h> /* for CUSTOM_RAND_TYPE */
|
#include <wolfssl/wolfcrypt/random.h> /* for CUSTOM_RAND_TYPE */
|
||||||
|
|
||||||
|
@ -3138,10 +3138,11 @@ static void bench_hmac(int doAsync, int type, int digestSz,
|
|||||||
int ret = 0, i, count = 0, times, pending = 0;
|
int ret = 0, i, count = 0, times, pending = 0;
|
||||||
#if defined(BENCH_EMBEDDED)
|
#if defined(BENCH_EMBEDDED)
|
||||||
DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING, MAX_DIGEST_SIZE, HEAP_HINT);
|
DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING, MAX_DIGEST_SIZE, HEAP_HINT);
|
||||||
|
(void)digestSz;
|
||||||
#else
|
#else
|
||||||
DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING, digestSz, HEAP_HINT);
|
DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING, digestSz, HEAP_HINT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* clear for done cleanup */
|
/* clear for done cleanup */
|
||||||
XMEMSET(hmac, 0, sizeof(hmac));
|
XMEMSET(hmac, 0, sizeof(hmac));
|
||||||
|
|
||||||
|
@ -634,8 +634,11 @@ WOLFSSL_API WOLFSSL_SESSION* wolfSSL_get1_session(WOLFSSL* ssl);
|
|||||||
/* what's ref count */
|
/* what's ref count */
|
||||||
|
|
||||||
WOLFSSL_API void wolfSSL_X509_free(WOLFSSL_X509*);
|
WOLFSSL_API void wolfSSL_X509_free(WOLFSSL_X509*);
|
||||||
|
|
||||||
|
#ifdef OPENSSL_EXTRA
|
||||||
WOLFSSL_API void wolfSSL_OPENSSL_free(void*);
|
WOLFSSL_API void wolfSSL_OPENSSL_free(void*);
|
||||||
WOLFSSL_API void *wolfSSL_OPENSSL_malloc(size_t a);
|
WOLFSSL_API void *wolfSSL_OPENSSL_malloc(size_t a);
|
||||||
|
#endif
|
||||||
|
|
||||||
WOLFSSL_API int wolfSSL_OCSP_parse_url(char* url, char** host, char** port,
|
WOLFSSL_API int wolfSSL_OCSP_parse_url(char* url, char** host, char** port,
|
||||||
char** path, int* ssl);
|
char** path, int* ssl);
|
||||||
|
Reference in New Issue
Block a user