Rename MPI zeroize function to mbedtls_mpi_zeroize

Avoid naming confusion
This commit is contained in:
Alexey Skalozub 2016-01-13 17:19:33 +02:00 committed by Simon Butcher
parent 3d53f41638
commit e17a8da17e

View File

@ -59,7 +59,7 @@
#endif
/* Implementation that should never be optimized out by the compiler */
static void mbedtls_zeroize( mbedtls_mpi_uint *v, size_t n ) {
static void mbedtls_mpi_zeroize( mbedtls_mpi_uint *v, size_t n ) {
volatile mbedtls_mpi_uint *p = v; while( n-- ) *p++ = 0;
}
@ -99,7 +99,7 @@ void mbedtls_mpi_free( mbedtls_mpi *X )
if( X->p != NULL )
{
mbedtls_zeroize( X->p, X->n );
mbedtls_mpi_zeroize( X->p, X->n );
mbedtls_free( X->p );
}
@ -126,7 +126,7 @@ int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs )
if( X->p != NULL )
{
memcpy( p, X->p, X->n * ciL );
mbedtls_zeroize( X->p, X->n );
mbedtls_mpi_zeroize( X->p, X->n );
mbedtls_free( X->p );
}
@ -164,7 +164,7 @@ int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs )
if( X->p != NULL )
{
memcpy( p, X->p, i * ciL );
mbedtls_zeroize( X->p, X->n );
mbedtls_mpi_zeroize( X->p, X->n );
mbedtls_free( X->p );
}