mirror of https://github.com/wolfSSL/wolfssl.git
Fixes for some async issues in FIPSv2.
parent
10070bb5fd
commit
7e5c41ca35
|
@ -8525,7 +8525,7 @@ int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
|
|||
/* if async and byte count above threshold */
|
||||
/* only 12-byte IV is supported in HW */
|
||||
if (aes->asyncDev.marker == WOLFSSL_ASYNC_MARKER_AES &&
|
||||
sz >= WC_ASYNC_THRESH_AES_GCM && ivSz == NONCE_SZ) {
|
||||
sz >= WC_ASYNC_THRESH_AES_GCM && ivSz == GCM_NONCE_MID_SZ) {
|
||||
#if defined(HAVE_CAVIUM)
|
||||
#ifdef HAVE_CAVIUM_V
|
||||
if (authInSz == 20) { /* Nitrox V GCM is only working with 20 byte AAD */
|
||||
|
@ -8878,7 +8878,7 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
|
|||
/* if async and byte count above threshold */
|
||||
/* only 12-byte IV is supported in HW */
|
||||
if (aes->asyncDev.marker == WOLFSSL_ASYNC_MARKER_AES &&
|
||||
sz >= WC_ASYNC_THRESH_AES_GCM && ivSz == NONCE_SZ) {
|
||||
sz >= WC_ASYNC_THRESH_AES_GCM && ivSz == GCM_NONCE_MID_SZ) {
|
||||
#if defined(HAVE_CAVIUM)
|
||||
#ifdef HAVE_CAVIUM_V
|
||||
if (authInSz == 20) { /* Nitrox V GCM is only working with 20 byte AAD */
|
||||
|
|
|
@ -9759,7 +9759,7 @@ static int rsa_certgen_test(RsaKey* key, RsaKey* keypub, WC_RNG* rng, byte* tmp)
|
|||
ret = 0;
|
||||
do {
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||
ret = wc_AsyncWait(ret, &key.asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
|
||||
ret = wc_AsyncWait(ret, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
|
||||
#endif
|
||||
if (ret >= 0) {
|
||||
ret = wc_MakeSelfCert(myCert, der, FOURK_BUF, key, rng);
|
||||
|
@ -11322,6 +11322,9 @@ static int dh_fips_generate_test(WC_RNG *rng)
|
|||
pubSz = sizeof(pub);
|
||||
|
||||
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) {
|
||||
ERROR_OUT(-8227, exit_gen_test);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue