Skip to content

Commit 07c9154

Browse files
committed
Fix TLS cases with non-block crypto
1 parent a029d20 commit 07c9154

10 files changed

Lines changed: 106 additions & 41 deletions

File tree

.github/workflows/os-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
'--enable-all CPPFLAGS=-DWOLFSSL_NO_CLIENT_AUTH',
8282
'--enable-all CPPFLAGS=''-DNO_WOLFSSL_CLIENT -DWOLFSSL_NO_CLIENT_AUTH''',
8383
'--enable-all CPPFLAGS=''-DNO_WOLFSSL_SERVER -DWOLFSSL_NO_CLIENT_AUTH''',
84-
'--enable-curve25519=nonblock --enable-ecc=nonblock --enable-sp=yes,nonblock --disable-examples CFLAGS="-DWOLFSSL_PUBLIC_MP -DWOLFSSL_DEBUG_NONBLOCK"',
84+
'--enable-curve25519=nonblock --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP -DWOLFSSL_DEBUG_NONBLOCK"',
8585
]
8686
name: make check
8787
if: github.repository_owner == 'wolfssl'

.wolfssl_known_macro_extras

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ WC_AES_GCM_DEC_AUTH_EARLY
597597
WC_ASN_HASH_SHA256
598598
WC_ASN_RUNTIME_DATE_CHECK_CONTROL
599599
WC_ASYNC_ENABLE_ECC_KEYGEN
600+
WC_ASYNC_ENABLE_X25519
600601
WC_ASYNC_NO_3DES
601602
WC_ASYNC_NO_AES
602603
WC_ASYNC_NO_ARC4
@@ -695,7 +696,6 @@ WOLFSSL_BIGINT_TYPES
695696
WOLFSSL_BIO_NO_FLOW_STATS
696697
WOLFSSL_BLAKE2B_INIT_EACH_FIELD
697698
WOLFSSL_BLAKE2S_INIT_EACH_FIELD
698-
WOLFSSL_BLIND_PRIVATE_KEY
699699
WOLFSSL_BYTESWAP32_ASM
700700
WOLFSSL_CAAM_BLACK_KEY_AESCCM
701701
WOLFSSL_CAAM_BLACK_KEY_SM
@@ -708,18 +708,15 @@ WOLFSSL_CLIENT_EXAMPLE
708708
WOLFSSL_CONTIKI
709709
WOLFSSL_CRL_ALLOW_MISSING_CDP
710710
WOLFSSL_DILITHIUM_ASSIGN_KEY
711-
WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM
712711
WOLFSSL_DILITHIUM_NO_ASN1
713712
WOLFSSL_DILITHIUM_NO_CHECK_KEY
714-
WOLFSSL_DILITHIUM_NO_LARGE_CODE
715713
WOLFSSL_DILITHIUM_NO_MAKE
716714
WOLFSSL_DILITHIUM_REVERSE_HASH_OID
717715
WOLFSSL_DILITHIUM_SIGN_CHECK_W0
718716
WOLFSSL_DILITHIUM_SIGN_CHECK_Y
719717
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC
720718
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC_A
721719
WOLFSSL_DILITHIUM_SMALL_MEM_POLY64
722-
WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM
723720
WOLFSSL_DISABLE_EARLY_SANITY_CHECKS
724721
WOLFSSL_DTLS_DISALLOW_FUTURE
725722
WOLFSSL_DTLS_RECORDS_CAN_SPAN_DATAGRAMS
@@ -785,10 +782,7 @@ WOLFSSL_MAKE_SYSTEM_NAME_LINUX
785782
WOLFSSL_MAKE_SYSTEM_NAME_WSL
786783
WOLFSSL_MDK5
787784
WOLFSSL_MEM_FAIL_COUNT
788-
WOLFSSL_MLKEM_ENCAPSULATE_SMALL_MEM
789785
WOLFSSL_MLKEM_INVNTT_UNROLL
790-
WOLFSSL_MLKEM_MAKEKEY_SMALL_MEM
791-
WOLFSSL_MLKEM_NO_LARGE_CODE
792786
WOLFSSL_MLKEM_NO_MALLOC
793787
WOLFSSL_MLKEM_NTT_UNROLL
794788
WOLFSSL_MONT_RED_CT

src/internal.c

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494

9595
#include <wolfssl/internal.h>
9696
#include <wolfssl/error-ssl.h>
97+
#include <wolfssl/wolfcrypt/error-crypt.h>
9798
#include <wolfssl/wolfcrypt/asn.h>
9899
#include <wolfssl/wolfcrypt/dh.h>
99100
#ifdef NO_INLINE
@@ -5598,7 +5599,9 @@ int EccSign(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out,
55985599
else
55995600
#endif /* HAVE_PK_CALLBACKS */
56005601
{
5601-
ret = wc_ecc_sign_hash(in, inSz, out, outSz, ssl->rng, key);
5602+
do {
5603+
ret = wc_ecc_sign_hash(in, inSz, out, outSz, ssl->rng, key);
5604+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
56025605
}
56035606

56045607
/* Handle async pending response */
@@ -5654,7 +5657,10 @@ int EccVerify(WOLFSSL* ssl, const byte* in, word32 inSz, const byte* out,
56545657
#endif
56555658
#endif /* HAVE_PK_CALLBACKS */
56565659
{
5657-
ret = wc_ecc_verify_hash(in, inSz, out, outSz, &ssl->eccVerifyRes, key);
5660+
do {
5661+
ret = wc_ecc_verify_hash(in, inSz, out, outSz, &ssl->eccVerifyRes,
5662+
key);
5663+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
56585664
}
56595665

56605666
/* Handle async pending response */
@@ -5725,7 +5731,9 @@ int EccSharedSecret(WOLFSSL* ssl, ecc_key* priv_key, ecc_key* pub_key,
57255731
#endif
57265732
{
57275733
PRIVATE_KEY_UNLOCK();
5728-
ret = wc_ecc_shared_secret(priv_key, pub_key, out, outlen);
5734+
do {
5735+
ret = wc_ecc_shared_secret(priv_key, pub_key, out, outlen);
5736+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
57295737
PRIVATE_KEY_LOCK();
57305738
}
57315739
}
@@ -5796,7 +5804,9 @@ int EccMakeKey(WOLFSSL* ssl, ecc_key* key, ecc_key* peer)
57965804
else
57975805
#endif
57985806
{
5799-
ret = wc_ecc_make_key_ex(ssl->rng, keySz, key, ecc_curve);
5807+
do {
5808+
ret = wc_ecc_make_key_ex(ssl->rng, keySz, key, ecc_curve);
5809+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
58005810
}
58015811

58025812
/* make sure the curve is set for TLS */
@@ -6146,6 +6156,20 @@ static int X25519SharedSecret(WOLFSSL* ssl, curve25519_key* priv_key,
61466156
}
61476157
}
61486158

6159+
/* Handle non-blocking Curve25519 without async layer. */
6160+
#ifdef WC_X25519_NONBLOCK
6161+
if (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK)) {
6162+
#ifdef WOLFSSL_ASYNC_CRYPT
6163+
ret = WC_PENDING_E;
6164+
#else
6165+
do {
6166+
ret = wc_curve25519_shared_secret_ex(priv_key, pub_key, out, outlen,
6167+
EC25519_LITTLE_ENDIAN);
6168+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
6169+
#endif
6170+
}
6171+
#endif /* WC_X25519_NONBLOCK */
6172+
61496173
/* Handle async pending response */
61506174
#ifdef WOLFSSL_ASYNC_CRYPT
61516175
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E)) {
@@ -6185,6 +6209,19 @@ static int X25519MakeKey(WOLFSSL* ssl, curve25519_key* key,
61856209
ret = wc_curve25519_make_key(ssl->rng, CURVE25519_KEYSIZE, key);
61866210
}
61876211

6212+
/* Handle non-blocking Curve25519 without async layer. */
6213+
#ifdef WC_X25519_NONBLOCK
6214+
if (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK)) {
6215+
#ifdef WOLFSSL_ASYNC_CRYPT
6216+
ret = WC_PENDING_E;
6217+
#else
6218+
do {
6219+
ret = wc_curve25519_make_key(ssl->rng, CURVE25519_KEYSIZE, key);
6220+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
6221+
#endif
6222+
}
6223+
#endif /* WC_X25519_NONBLOCK */
6224+
61886225
if (ret == 0) {
61896226
ssl->ecdhCurveOID = ECC_X25519_OID;
61906227
#if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE)
@@ -8189,7 +8226,8 @@ void FreeKey(WOLFSSL* ssl, int type, void** pKey)
81898226
#endif /* HAVE_ED25519 */
81908227
#ifdef HAVE_CURVE25519
81918228
case DYNAMIC_TYPE_CURVE25519:
8192-
#if defined(WC_X25519_NONBLOCK) && defined(WOLFSSL_ASYNC_CRYPT_SW) && \
8229+
#if defined(WC_X25519_NONBLOCK) && \
8230+
defined(WOLFSSL_ASYNC_CRYPT_SW) && \
81938231
defined(WC_ASYNC_ENABLE_X25519)
81948232
if (((curve25519_key*)*pKey)->nbCtx != NULL) {
81958233
XFREE(((curve25519_key*)*pKey)->nbCtx, ssl->heap,

src/ssl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#include <wolfssl/internal.h>
3333
#include <wolfssl/error-ssl.h>
34+
#include <wolfssl/wolfcrypt/error-crypt.h>
3435
#include <wolfssl/wolfcrypt/coding.h>
3536
#include <wolfssl/wolfcrypt/kdf.h>
3637
#ifdef NO_INLINE
@@ -4693,6 +4694,10 @@ int wolfSSL_get_error(WOLFSSL* ssl, int ret)
46934694
return WOLFSSL_ERROR_SYSCALL; /* convert to OpenSSL type */
46944695
else if (ssl->error == WC_NO_ERR_TRACE(SOCKET_PEER_CLOSED_E))
46954696
return WOLFSSL_ERROR_SYSCALL; /* convert to OpenSSL type */
4697+
#endif
4698+
#ifdef WOLFSSL_ASYNC_CRYPT
4699+
else if (ssl->error == WC_NO_ERR_TRACE(MP_WOULDBLOCK))
4700+
return WC_PENDING_E; /* map non-blocking crypto */
46964701
#endif
46974702
return ssl->error;
46984703
}

tests/api.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959

6060
#include <wolfssl/ssl.h> /* compatibility layer */
6161
#include <wolfssl/error-ssl.h>
62+
#include <wolfssl/wolfcrypt/error-crypt.h>
6263

6364
#include <wolfssl/test.h>
6465
#include <tests/utils.h>
@@ -4811,8 +4812,11 @@ int test_ssl_memio_do_handshake(test_ssl_memio_ctx* ctx, int max_rounds,
48114812
}
48124813
else {
48134814
err = wolfSSL_get_error(ctx->c_ssl, ret);
4814-
if (err != WOLFSSL_ERROR_WANT_READ &&
4815-
err != WOLFSSL_ERROR_WANT_WRITE) {
4815+
if (err == WC_NO_ERR_TRACE(MP_WOULDBLOCK)) {
4816+
/* retry non-blocking math */
4817+
}
4818+
else if (err != WOLFSSL_ERROR_WANT_READ &&
4819+
err != WOLFSSL_ERROR_WANT_WRITE) {
48164820
char buff[WOLFSSL_MAX_ERROR_SZ];
48174821
fprintf(stderr, "error = %d, %s\n", err,
48184822
wolfSSL_ERR_error_string((word32)err, buff));
@@ -4833,8 +4837,11 @@ int test_ssl_memio_do_handshake(test_ssl_memio_ctx* ctx, int max_rounds,
48334837
}
48344838
else {
48354839
err = wolfSSL_get_error(ctx->s_ssl, ret);
4836-
if (err != WOLFSSL_ERROR_WANT_READ &&
4837-
err != WOLFSSL_ERROR_WANT_WRITE) {
4840+
if (err == WC_NO_ERR_TRACE(MP_WOULDBLOCK)) {
4841+
/* retry non-blocking math */
4842+
}
4843+
else if (err != WOLFSSL_ERROR_WANT_READ &&
4844+
err != WOLFSSL_ERROR_WANT_WRITE) {
48384845
char buff[WOLFSSL_MAX_ERROR_SZ];
48394846
fprintf(stderr, "error = %d, %s\n", err,
48404847
wolfSSL_ERR_error_string((word32)err, buff));

tests/utils.c

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <tests/unit.h>
2323
#include <tests/utils.h>
24+
#include <wolfssl/wolfcrypt/error-crypt.h>
2425

2526
#ifdef HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES
2627

@@ -182,9 +183,16 @@ int test_memio_do_handshake(WOLFSSL *ssl_c, WOLFSSL *ssl_s,
182183
}
183184
else {
184185
err = wolfSSL_get_error(ssl_c, ret);
185-
if (err != WOLFSSL_ERROR_WANT_READ &&
186-
err != WOLFSSL_ERROR_WANT_WRITE)
186+
if (err == WC_NO_ERR_TRACE(MP_WOULDBLOCK)) {
187+
/* retry non-blocking math */
188+
}
189+
else if (err != WOLFSSL_ERROR_WANT_READ &&
190+
err != WOLFSSL_ERROR_WANT_WRITE) {
191+
char buff[WOLFSSL_MAX_ERROR_SZ];
192+
fprintf(stderr, "memio client error = %d, %s\n", err,
193+
wolfSSL_ERR_error_string((word32)err, buff));
187194
return -1;
195+
}
188196
}
189197
}
190198
if (!hs_s) {
@@ -196,9 +204,16 @@ int test_memio_do_handshake(WOLFSSL *ssl_c, WOLFSSL *ssl_s,
196204
}
197205
else {
198206
err = wolfSSL_get_error(ssl_s, ret);
199-
if (err != WOLFSSL_ERROR_WANT_READ &&
200-
err != WOLFSSL_ERROR_WANT_WRITE)
207+
if (err == WC_NO_ERR_TRACE(MP_WOULDBLOCK)) {
208+
/* retry non-blocking math */
209+
}
210+
else if (err != WOLFSSL_ERROR_WANT_READ &&
211+
err != WOLFSSL_ERROR_WANT_WRITE) {
212+
char buff[WOLFSSL_MAX_ERROR_SZ];
213+
fprintf(stderr, "memio server error = %d, %s\n", err,
214+
wolfSSL_ERR_error_string((word32)err, buff));
201215
return -1;
216+
}
202217
}
203218
}
204219
handshake_complete = hs_c && hs_s;
@@ -792,4 +807,3 @@ void DEBUG_WRITE_DER(const byte* der, int derSz, const char* fileName)
792807
}
793808
}
794809
#endif
795-

wolfcrypt/src/asn.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18958,8 +18958,11 @@ int ConfirmSignature(SignatureCtx* sigCtx,
1895818958
WOLFSSL_ERROR_VERBOSE(ret);
1895918959
goto exit_cs;
1896018960
}
18961-
ret = wc_ecc_sm2_verify_hash(sig, sigSz, sigCtx->digest,
18962-
sigCtx->digestSz, &sigCtx->verify, sigCtx->key.ecc);
18961+
do {
18962+
ret = wc_ecc_sm2_verify_hash(sig, sigSz,
18963+
sigCtx->digest, sigCtx->digestSz,
18964+
&sigCtx->verify, sigCtx->key.ecc);
18965+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
1896318966
}
1896418967
else
1896518968
#endif
@@ -18980,9 +18983,11 @@ int ConfirmSignature(SignatureCtx* sigCtx,
1898018983
#endif /* WOLFSSL_RENESAS_FSPSM_TLS */
1898118984
#endif /* HAVE_PK_CALLBACKS */
1898218985
{
18983-
ret = wc_ecc_verify_hash(sig, sigSz, sigCtx->digest,
18984-
(word32)sigCtx->digestSz, &sigCtx->verify,
18985-
sigCtx->key.ecc);
18986+
do {
18987+
ret = wc_ecc_verify_hash(sig, sigSz,
18988+
sigCtx->digest, (word32)sigCtx->digestSz,
18989+
&sigCtx->verify, sigCtx->key.ecc);
18990+
} while (ret == WC_NO_ERR_TRACE(MP_WOULDBLOCK));
1898618991
}
1898718992
break;
1898818993
}

wolfcrypt/test/test.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38204,7 +38204,7 @@ static wc_test_ret_t curve25519_overflow_test(WC_RNG* rng)
3820438204
y = sizeof(shared);
3820538205
ret = wc_curve25519_shared_secret(&userA, &userA, shared, &y);
3820638206
#if defined(WOLFSSL_ASYNC_CRYPT)
38207-
if (ret == WC_PENDING_E)
38207+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3820838208
ret = wc_AsyncWait(ret, &userA.asyncDev, WC_ASYNC_FLAG_NONE);
3820938209
#endif
3821038210
if (ret != 0) {
@@ -38798,15 +38798,15 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3879838798
/* make curve25519 keys */
3879938799
ret = wc_curve25519_make_key(&rng, 32, userA);
3880038800
#if defined(WOLFSSL_ASYNC_CRYPT)
38801-
if (ret == WC_PENDING_E)
38801+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3880238802
ret = wc_AsyncWait(ret, &userA->asyncDev, WC_ASYNC_FLAG_NONE);
3880338803
#endif
3880438804
if (ret != 0)
3880538805
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), cleanup);
3880638806

3880738807
ret = wc_curve25519_make_key(&rng, 32, userB);
3880838808
#if defined(WOLFSSL_ASYNC_CRYPT)
38809-
if (ret == WC_PENDING_E)
38809+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3881038810
ret = wc_AsyncWait(ret, &userB->asyncDev, WC_ASYNC_FLAG_NONE);
3881138811
#endif
3881238812
if (ret != 0)
@@ -38817,7 +38817,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3881738817
x = sizeof(sharedA);
3881838818
ret = wc_curve25519_shared_secret(userA, userB, sharedA, &x);
3881938819
#if defined(WOLFSSL_ASYNC_CRYPT)
38820-
if (ret == WC_PENDING_E)
38820+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3882138821
ret = wc_AsyncWait(ret, &userA->asyncDev, WC_ASYNC_FLAG_NONE);
3882238822
#endif
3882338823
if (ret != 0) {
@@ -38828,7 +38828,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3882838828
y = sizeof(sharedB);
3882938829
ret = wc_curve25519_shared_secret(userB, userA, sharedB, &y);
3883038830
#if defined(WOLFSSL_ASYNC_CRYPT)
38831-
if (ret == WC_PENDING_E)
38831+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3883238832
ret = wc_AsyncWait(ret, &userB->asyncDev, WC_ASYNC_FLAG_NONE);
3883338833
#endif
3883438834
if (ret != 0) {
@@ -38865,7 +38865,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3886538865
y = sizeof(sharedB);
3886638866
ret = wc_curve25519_shared_secret(userB, pubKey, sharedB, &y);
3886738867
#if defined(WOLFSSL_ASYNC_CRYPT)
38868-
if (ret == WC_PENDING_E)
38868+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3886938869
ret = wc_AsyncWait(ret, &userB->asyncDev, WC_ASYNC_FLAG_NONE);
3887038870
#endif
3887138871
if (ret != 0) {
@@ -38891,7 +38891,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3889138891
y = sizeof(sharedB);
3889238892
ret = wc_curve25519_shared_secret(userA, userB, sharedB, &y);
3889338893
#if defined(WOLFSSL_ASYNC_CRYPT)
38894-
if (ret == WC_PENDING_E)
38894+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3889538895
ret = wc_AsyncWait(ret, &userA->asyncDev, WC_ASYNC_FLAG_NONE);
3889638896
#endif
3889738897
if (ret != 0)
@@ -38905,7 +38905,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3890538905
y = sizeof(sharedB);
3890638906
ret = wc_curve25519_shared_secret(userB, userA, sharedB, &y);
3890738907
#if defined(WOLFSSL_ASYNC_CRYPT)
38908-
if (ret == WC_PENDING_E)
38908+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3890938909
ret = wc_AsyncWait(ret, &userB->asyncDev, WC_ASYNC_FLAG_NONE);
3891038910
#endif
3891138911
if (ret != 0)
@@ -38928,7 +38928,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3892838928

3892938929
ret = wc_curve25519_make_key(&rng, 32, userB);
3893038930
#if defined(WOLFSSL_ASYNC_CRYPT)
38931-
if (ret == WC_PENDING_E)
38931+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3893238932
ret = wc_AsyncWait(ret, &userB->asyncDev, WC_ASYNC_FLAG_NONE);
3893338933
#endif
3893438934
if (ret != 0)
@@ -38937,7 +38937,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3893738937
x = sizeof(sharedA);
3893838938
ret = wc_curve25519_shared_secret(userA, userB, sharedA, &x);
3893938939
#if defined(WOLFSSL_ASYNC_CRYPT)
38940-
if (ret == WC_PENDING_E)
38940+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3894138941
ret = wc_AsyncWait(ret, &userA->asyncDev, WC_ASYNC_FLAG_NONE);
3894238942
#endif
3894338943
if (ret != 0)
@@ -38946,7 +38946,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
3894638946
y = sizeof(sharedB);
3894738947
ret = wc_curve25519_shared_secret(userB, userA, sharedB, &y);
3894838948
#if defined(WOLFSSL_ASYNC_CRYPT)
38949-
if (ret == WC_PENDING_E)
38949+
if (ret == WC_NO_ERR_TRACE(WC_PENDING_E))
3895038950
ret = wc_AsyncWait(ret, &userB->asyncDev, WC_ASYNC_FLAG_NONE);
3895138951
#endif
3895238952
if (ret != 0)

0 commit comments

Comments
 (0)