mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
update for async build and include for getenv
This commit is contained in:
@@ -24766,8 +24766,7 @@ int wolfSSL_HMAC_CTX_copy(WOLFSSL_HMAC_CTX* des, WOLFSSL_HMAC_CTX* src)
|
||||
WC_HMAC_BLOCK_SIZE);
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
XMEMCPY(des->hmac.asyncDev, src->hmac.asyncDev, sizeof(WC_ASYNC_DEV));
|
||||
XMEMCPY(des->hmac.keyRaw, src->hmac.keyRaw, WC_HMAC_BLOCK_SIZE);
|
||||
XMEMCPY(&des->hmac.asyncDev, &src->hmac.asyncDev, sizeof(WC_ASYNC_DEV));
|
||||
des->hmac.keyLen = src->hmac.keyLen;
|
||||
#ifdef HAVE_CAVIUM
|
||||
des->hmac.data = (byte*)XMALLOC(src->hmac.dataLen, des->heap,
|
||||
|
@@ -4073,26 +4073,6 @@ int wc_ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash,
|
||||
return ECC_BAD_ARG_E;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
if (key->asyncDev.marker == WOLFSSL_ASYNC_MARKER_ECC) {
|
||||
#ifdef HAVE_CAVIUM
|
||||
/* TODO: Not implemented */
|
||||
#else
|
||||
AsyncCryptTestDev* testDev = &key->asyncDev.dev;
|
||||
if (testDev->type == ASYNC_TEST_NONE) {
|
||||
testDev->type = ASYNC_TEST_ECC_VERIFY;
|
||||
testDev->eccVerify.in = sig;
|
||||
testDev->eccVerify.inSz = siglen;
|
||||
testDev->eccVerify.out = hash;
|
||||
testDev->eccVerify.outSz = hashlen;
|
||||
testDev->eccVerify.stat = state;
|
||||
testDev->eccVerify.key = key;
|
||||
return WC_PENDING_E;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
switch(key->state) {
|
||||
case ECC_STATE_NONE:
|
||||
case ECC_STATE_VERIFY_DECODE:
|
||||
|
@@ -4257,10 +4257,6 @@ int des3_test(void)
|
||||
wc_Des3Free(&enc);
|
||||
wc_Des3Free(&dec);
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
wc_Des3AsyncFree(&enc);
|
||||
wc_Des3AsyncFree(&dec);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* NO_DES */
|
||||
|
@@ -43,10 +43,7 @@
|
||||
* to need the size of the structure. */
|
||||
typedef struct WOLFSSL_AES_KEY {
|
||||
/* aligned and big enough for Aes from wolfssl/wolfcrypt/aes.h */
|
||||
ALIGN16 void* holder[360 / sizeof(void*)];
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
void* additional[64 / sizeof(void*)]; /* async uses additional memory */
|
||||
#endif
|
||||
ALIGN16 void* holder[(360 + WC_ASYNC_DEV_SIZE)/ sizeof(void*)];
|
||||
#ifdef GCM_TABLE
|
||||
/* key-based fast multiplication table. */
|
||||
ALIGN16 void* M0[4096 / sizeof(void*)];
|
||||
|
@@ -39,10 +39,7 @@
|
||||
* the size of RC4_KEY structures. */
|
||||
typedef struct WOLFSSL_RC4_KEY {
|
||||
/* big enough for Arc4 from wolfssl/wolfcrypt/arc4.h */
|
||||
unsigned char holder[272];
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
unsigned char additional[64]; /* async uses additional memory */
|
||||
#endif
|
||||
void* holder[(272 + WC_ASYNC_DEV_SIZE) / sizeof(void*)];
|
||||
} WOLFSSL_RC4_KEY;
|
||||
typedef WOLFSSL_RC4_KEY RC4_KEY;
|
||||
|
||||
|
@@ -327,7 +327,8 @@
|
||||
/* snprintf is used in asn.c for GetTimeString, PKCS7 test, and when
|
||||
debugging is turned on */
|
||||
#ifndef USE_WINDOWS_API
|
||||
#if defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA)
|
||||
#if defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) && \
|
||||
!defined(NO_STDIO_FILESYSTEM)
|
||||
/* case where stdio is not included else where but is needed for
|
||||
* snprintf */
|
||||
#include <stdio.h>
|
||||
@@ -337,12 +338,6 @@
|
||||
#define XSNPRINTF _snprintf
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
#ifndef XGETENV
|
||||
#define XGETENV getenv
|
||||
#endif
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
|
||||
#if defined(WOLFSSL_CERT_EXT) || defined(HAVE_ALPN)
|
||||
/* use only Thread Safe version of strtok */
|
||||
#if defined(__MINGW32__) || defined(WOLFSSL_TIRTOS) || \
|
||||
@@ -359,6 +354,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) && \
|
||||
!defined(NO_STDIO_FILESYSTEM)
|
||||
#ifndef XGETENV
|
||||
#include <stdlib.h>
|
||||
#define XGETENV getenv
|
||||
#endif
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
|
||||
#ifndef CTYPE_USER
|
||||
#include <ctype.h>
|
||||
#if defined(HAVE_ECC) || defined(HAVE_OCSP) || \
|
||||
|
Reference in New Issue
Block a user