mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:05:36 +01:00
Rename MPI zeroize function to mbedtls_mpi_zeroize
Avoid naming confusion
This commit is contained in:
parent
3d53f41638
commit
e17a8da17e
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user