Changed every memcpy to SCA equivalent mbedtls_platform_memcpy

This makes physical attacks more difficult.
This commit is contained in:
Teppo Järvelin 2019-10-02 09:09:31 +03:00
parent aeecf04be3
commit 91d7938761
59 changed files with 345 additions and 341 deletions

View file

@ -355,7 +355,7 @@ static void debug_print_line_by_line( const mbedtls_ssl_context *ssl, int level,
if( len > DEBUG_BUF_SIZE - 1 )
len = DEBUG_BUF_SIZE - 1;
memcpy( str, start, len );
mbedtls_platform_memcpy( str, start, len );
str[len] = '\0';
debug_send_line( ssl, level, file, line, str );