forked from wolfSSL/wolfssl
Fixes for async build and tests.
This commit is contained in:
@@ -3091,7 +3091,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
|
|
||||||
#if defined(OPENSSL_EXTRA) && defined(HAVE_EXT_CACHE)
|
#if defined(OPENSSL_EXTRA) && defined(HAVE_EXT_CACHE)
|
||||||
if (flatSession) {
|
if (flatSession) {
|
||||||
XFREE(flatSession, heap, DYNAMIC_TYPE_TMP_BUFFER);
|
XFREE(flatSession, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
wolfSSL_SESSION_free(session);
|
wolfSSL_SESSION_free(session);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -22279,7 +22279,7 @@ static void test_wolfSSL_d2i_PrivateKeys_bio(void)
|
|||||||
AssertIntEQ(wolfSSL_i2d_RSAPrivateKey(rsa, &bufPtr),
|
AssertIntEQ(wolfSSL_i2d_RSAPrivateKey(rsa, &bufPtr),
|
||||||
sizeof_client_key_der_2048);
|
sizeof_client_key_der_2048);
|
||||||
AssertNotNull(bufPtr);
|
AssertNotNull(bufPtr);
|
||||||
free(bufPtr);
|
XFREE(bufPtr, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||||
#endif /* USE_CERT_BUFFERS_2048 WOLFSSL_KEY_GEN */
|
#endif /* USE_CERT_BUFFERS_2048 WOLFSSL_KEY_GEN */
|
||||||
RSA_free(rsa);
|
RSA_free(rsa);
|
||||||
#endif /* NO_RSA */
|
#endif /* NO_RSA */
|
||||||
|
@@ -12980,21 +12980,33 @@ static int dh_test_ffdhe(WC_RNG *rng, const DhParams* params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = wc_DhGenerateKeyPair(&key, rng, priv, &privSz, pub, &pubSz);
|
ret = wc_DhGenerateKeyPair(&key, rng, priv, &privSz, pub, &pubSz);
|
||||||
|
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||||
|
ret = wc_AsyncWait(ret, &key.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||||
|
#endif
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERROR_OUT(-7184, done);
|
ERROR_OUT(-7184, done);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = wc_DhGenerateKeyPair(&key2, rng, priv2, &privSz2, pub2, &pubSz2);
|
ret = wc_DhGenerateKeyPair(&key2, rng, priv2, &privSz2, pub2, &pubSz2);
|
||||||
|
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||||
|
ret = wc_AsyncWait(ret, &key2.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||||
|
#endif
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERROR_OUT(-7185, done);
|
ERROR_OUT(-7185, done);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = wc_DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2);
|
ret = wc_DhAgree(&key, agree, &agreeSz, priv, privSz, pub2, pubSz2);
|
||||||
|
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||||
|
ret = wc_AsyncWait(ret, &key.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||||
|
#endif
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERROR_OUT(-7186, done);
|
ERROR_OUT(-7186, done);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = wc_DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz);
|
ret = wc_DhAgree(&key2, agree2, &agreeSz2, priv2, privSz2, pub, pubSz);
|
||||||
|
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||||
|
ret = wc_AsyncWait(ret, &key2.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||||
|
#endif
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ERROR_OUT(-7187, done);
|
ERROR_OUT(-7187, done);
|
||||||
}
|
}
|
||||||
|
@@ -59,6 +59,9 @@ typedef struct WOLFSSL_AES_KEY {
|
|||||||
#ifdef HAVE_PKCS11
|
#ifdef HAVE_PKCS11
|
||||||
void* pkcs11_holder[(AES_MAX_ID_LEN + sizeof(int)) / sizeof(void*)];
|
void* pkcs11_holder[(AES_MAX_ID_LEN + sizeof(int)) / sizeof(void*)];
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||||
|
void* async_holder[128 / sizeof(void*)];
|
||||||
|
#endif
|
||||||
} WOLFSSL_AES_KEY;
|
} WOLFSSL_AES_KEY;
|
||||||
typedef WOLFSSL_AES_KEY AES_KEY;
|
typedef WOLFSSL_AES_KEY AES_KEY;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user