mirror of https://github.com/wolfSSL/wolfssl
Merge pull request #939 from dgarske/fixes_async
Fixes for build with async
This commit is contained in:
commit
320ad56139
|
@ -3411,9 +3411,15 @@ void bench_eccEncrypt(void)
|
|||
}
|
||||
|
||||
ret = wc_ecc_make_key(&rng, keySize, &userA);
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
ret = wc_AsyncWait(ret, &userA.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
#endif
|
||||
if (ret != 0)
|
||||
goto exit;
|
||||
ret = wc_ecc_make_key(&rng, keySize, &userB);
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
ret = wc_AsyncWait(ret, &userB.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
#endif
|
||||
if (ret != 0)
|
||||
goto exit;
|
||||
|
||||
|
|
|
@ -7989,6 +7989,9 @@ static int dh_generate_test(WC_RNG *rng)
|
|||
|
||||
/* Use API. */
|
||||
ret = wc_DhGenerateKeyPair(&smallKey, rng, priv, &privSz, pub, &pubSz);
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||
ret = wc_AsyncWait(ret, &smallKey.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
ret = -5707;
|
||||
}
|
||||
|
@ -9193,6 +9196,8 @@ int scrypt_test(void)
|
|||
if (XMEMCMP(derived, verify2, sizeof(verify2)) != 0)
|
||||
return -6003;
|
||||
|
||||
/* Don't run these test on embedded, since they use large mallocs */
|
||||
#ifndef BENCH_EMBEDDED
|
||||
ret = wc_scrypt(derived, (byte*)"pleaseletmein", 13,
|
||||
(byte*)"SodiumChloride", 14, 14, 8, 1, sizeof(verify3));
|
||||
if (ret != 0)
|
||||
|
@ -9208,6 +9213,7 @@ int scrypt_test(void)
|
|||
if (XMEMCMP(derived, verify4, sizeof(verify4)) != 0)
|
||||
return -6007;
|
||||
#endif
|
||||
#endif /* !BENCH_EMBEDDED */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3003,7 +3003,7 @@ typedef struct HS_Hashes {
|
|||
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
#define MAX_ASYNC_ARGS 16
|
||||
#define MAX_ASYNC_ARGS 18
|
||||
typedef void (*FreeArgsCb)(struct WOLFSSL* ssl, void* pArgs);
|
||||
|
||||
struct WOLFSSL_ASYNC {
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
#include <wolfssl/wolfcrypt/fe_operations.h>
|
||||
#include <wolfssl/wolfcrypt/random.h>
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
#include <wolfssl/wolfcrypt/async.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -50,7 +54,7 @@ typedef struct {
|
|||
#ifdef FREESCALE_LTC_ECC
|
||||
byte pointY[CURVE25519_KEYSIZE];
|
||||
#endif
|
||||
}ECPoint;
|
||||
} ECPoint;
|
||||
|
||||
/* A CURVE25519 Key */
|
||||
typedef struct curve25519_key {
|
||||
|
@ -61,6 +65,10 @@ typedef struct curve25519_key {
|
|||
curves (idx >= 0) or user supplied */
|
||||
ECPoint p; /* public key */
|
||||
ECPoint k; /* private key */
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
WC_ASYNC_DEV asyncDev;
|
||||
#endif
|
||||
} curve25519_key;
|
||||
|
||||
enum {
|
||||
|
|
Loading…
Reference in New Issue