mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 15:03:00 +00:00
[MBEDTLS] Update to version 2.7.6. CORE-15280
Note: this disables the MBEDTLS_DEPRECATED_REMOVED configuration value, because we require the now-deprecated MD5 & SHA functions for bcrypt.
This commit is contained in:
parent
9f1e053260
commit
d9e6c9b539
124 changed files with 10330 additions and 3757 deletions
15
dll/3rdparty/mbedtls/platform.c
vendored
15
dll/3rdparty/mbedtls/platform.c
vendored
|
@ -31,6 +31,14 @@
|
|||
|
||||
#include "mbedtls/platform.h"
|
||||
|
||||
#if defined(MBEDTLS_ENTROPY_NV_SEED) && \
|
||||
!defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO)
|
||||
/* Implementation that should never be optimized out by the compiler */
|
||||
static void mbedtls_zeroize( void *v, size_t n ) {
|
||||
volatile unsigned char *p = (unsigned char*)v; while( n-- ) *p++ = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_MEMORY)
|
||||
#if !defined(MBEDTLS_PLATFORM_STD_CALLOC)
|
||||
static void *platform_calloc_uninit( size_t n, size_t size )
|
||||
|
@ -76,7 +84,7 @@ int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... )
|
|||
return( -1 );
|
||||
|
||||
va_start( argp, fmt );
|
||||
#if defined(_TRUNCATE)
|
||||
#if defined(_TRUNCATE) && !defined(__MINGW32__)
|
||||
ret = _vsnprintf_s( s, n, _TRUNCATE, fmt, argp );
|
||||
#else
|
||||
ret = _vsnprintf( s, n, fmt, argp );
|
||||
|
@ -230,12 +238,13 @@ int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len )
|
|||
size_t n;
|
||||
|
||||
if( ( file = fopen( MBEDTLS_PLATFORM_STD_NV_SEED_FILE, "rb" ) ) == NULL )
|
||||
return -1;
|
||||
return( -1 );
|
||||
|
||||
if( ( n = fread( buf, 1, buf_len, file ) ) != buf_len )
|
||||
{
|
||||
fclose( file );
|
||||
return -1;
|
||||
mbedtls_zeroize( buf, buf_len );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
fclose( file );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue