File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
features/cryptocell/FEATURE_CRYPTOCELL310 Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 22
22
#if defined(MBEDTLS_CCM_ALT )
23
23
#include <string.h>
24
24
#include "mbedtls/platform.h"
25
+ #include "mbedtls/platform_util.h"
25
26
#include "mbedtls/aes.h"
26
27
27
- /* Implementation that should never be optimized out by the compiler */
28
- static void mbedtls_zeroize ( void * v , size_t n ) {
29
- volatile unsigned char * p = (unsigned char * )v ;
30
- while ( n -- ) * p ++ = 0 ;
31
- }
32
-
33
28
void mbedtls_ccm_init ( mbedtls_ccm_context * ctx )
34
29
{
35
30
memset ( ctx , 0 , sizeof ( mbedtls_ccm_context ) );
36
31
}
37
32
38
33
void mbedtls_ccm_free ( mbedtls_ccm_context * ctx )
39
34
{
40
- mbedtls_zeroize ( ctx , sizeof ( mbedtls_ccm_context ) );
35
+ mbedtls_platform_zeroize ( ctx , sizeof ( mbedtls_ccm_context ) );
41
36
}
42
37
43
38
int mbedtls_ccm_setkey ( mbedtls_ccm_context * ctx ,
You can’t perform that action at this time.
0 commit comments