1. add lock function for every function

2. modify some function for crypto
This commit is contained in:
liuhan
2016-08-08 13:56:36 +08:00
committed by Wu Jian Gang
parent 30be5f6eb5
commit d9b660f6d4
15 changed files with 436 additions and 86 deletions

View File

@@ -58,6 +58,8 @@
#define mbedtls_free free
#endif
#if !defined(MBEDTLS_BIGNUM_ALT)
/* Implementation that should never be optimized out by the compiler */
static void mbedtls_mpi_zeroize( mbedtls_mpi_uint *v, size_t n ) {
volatile mbedtls_mpi_uint *p = v; while( n-- ) *p++ = 0;
@@ -2264,6 +2266,7 @@ cleanup:
}
#endif /* MBEDTLS_GENPRIME */
#endif /* MBEDTLS_BIGNUM_ALT */
#if defined(MBEDTLS_SELF_TEST)