mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Rename mbedtls_zeroize to mbedtls_platform_zeroize
This commit is contained in:
parent
904e1efb8c
commit
1f6301b3c8
45 changed files with 216 additions and 218 deletions
|
|
@ -36,7 +36,7 @@
|
|||
#include "mbedtls/pkcs12.h"
|
||||
#include "mbedtls/asn1.h"
|
||||
#include "mbedtls/cipher.h"
|
||||
#include "mbedtls/utils.h"
|
||||
#include "mbedtls/platform_util.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ int mbedtls_pkcs12_pbe_sha1_rc4_128( mbedtls_asn1_buf *pbe_params, int mode,
|
|||
goto exit;
|
||||
|
||||
exit:
|
||||
mbedtls_zeroize( key, sizeof( key ) );
|
||||
mbedtls_platform_zeroize( key, sizeof( key ) );
|
||||
mbedtls_arc4_free( &ctx );
|
||||
|
||||
return( ret );
|
||||
|
|
@ -219,8 +219,8 @@ int mbedtls_pkcs12_pbe( mbedtls_asn1_buf *pbe_params, int mode,
|
|||
ret = MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH;
|
||||
|
||||
exit:
|
||||
mbedtls_zeroize( key, sizeof( key ) );
|
||||
mbedtls_zeroize( iv, sizeof( iv ) );
|
||||
mbedtls_platform_zeroize( key, sizeof( key ) );
|
||||
mbedtls_platform_zeroize( iv, sizeof( iv ) );
|
||||
mbedtls_cipher_free( &cipher_ctx );
|
||||
|
||||
return( ret );
|
||||
|
|
@ -348,10 +348,10 @@ int mbedtls_pkcs12_derivation( unsigned char *data, size_t datalen,
|
|||
ret = 0;
|
||||
|
||||
exit:
|
||||
mbedtls_zeroize( salt_block, sizeof( salt_block ) );
|
||||
mbedtls_zeroize( pwd_block, sizeof( pwd_block ) );
|
||||
mbedtls_zeroize( hash_block, sizeof( hash_block ) );
|
||||
mbedtls_zeroize( hash_output, sizeof( hash_output ) );
|
||||
mbedtls_platform_zeroize( salt_block, sizeof( salt_block ) );
|
||||
mbedtls_platform_zeroize( pwd_block, sizeof( pwd_block ) );
|
||||
mbedtls_platform_zeroize( hash_block, sizeof( hash_block ) );
|
||||
mbedtls_platform_zeroize( hash_output, sizeof( hash_output ) );
|
||||
|
||||
mbedtls_md_free( &md_ctx );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue