Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/we_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,10 @@ static int we_dh_generate_key_int(DH *dh, we_Dh *engineDh)
rc);
ret = 0;
}
}
#if defined(WE_DH_USE_GLOBAL_RNG) && !defined(WE_SINGLE_THREADED)
wc_UnLockMutex(we_rng_mutex);
wc_UnLockMutex(we_rng_mutex);
#endif
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/we_ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,11 +1193,11 @@ static int we_ecdh_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keyLen)
}
}
}
}
#if defined(WE_ECC_USE_GLOBAL_RNG) && defined(ECC_TIMING_RESISTANT) \
&& !defined(WE_SINGLE_THREADED)
wc_UnLockMutex(we_rng_mutex);
wc_UnLockMutex(we_rng_mutex);
#endif
}
}
if (ret == 1) {
/* Return length of secret. */
Expand Down Expand Up @@ -1981,11 +1981,11 @@ static int we_ec_key_compute_key(unsigned char **psec, size_t *pseclen,
WOLFENGINE_ERROR_FUNC(WE_LOG_PK, "wc_ecc_shared_secret", rc);
ret = 0;
}
}
#if defined(WE_ECC_USE_GLOBAL_RNG) && defined(ECC_TIMING_RESISTANT) \
&& !defined(WE_SINGLE_THREADED)
wc_UnLockMutex(we_rng_mutex);
wc_UnLockMutex(we_rng_mutex);
#endif
}
}
if (ret == 1) {
WOLFENGINE_MSG(WE_LOG_PK, "Calculated ECDH shared secret");
Expand Down