mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 06:53: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/hmac_drbg.c
vendored
15
dll/3rdparty/mbedtls/hmac_drbg.c
vendored
|
@ -366,11 +366,14 @@ int mbedtls_hmac_drbg_write_seed_file( mbedtls_hmac_drbg_context *ctx, const cha
|
|||
|
||||
exit:
|
||||
fclose( f );
|
||||
mbedtls_zeroize( buf, sizeof( buf ) );
|
||||
|
||||
return( ret );
|
||||
}
|
||||
|
||||
int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const char *path )
|
||||
{
|
||||
int ret = 0;
|
||||
FILE *f;
|
||||
size_t n;
|
||||
unsigned char buf[ MBEDTLS_HMAC_DRBG_MAX_INPUT ];
|
||||
|
@ -389,14 +392,16 @@ int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const ch
|
|||
}
|
||||
|
||||
if( fread( buf, 1, n, f ) != n )
|
||||
{
|
||||
fclose( f );
|
||||
return( MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR );
|
||||
}
|
||||
ret = MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR;
|
||||
else
|
||||
mbedtls_hmac_drbg_update( ctx, buf, n );
|
||||
|
||||
fclose( f );
|
||||
|
||||
mbedtls_hmac_drbg_update( ctx, buf, n );
|
||||
mbedtls_zeroize( buf, sizeof( buf ) );
|
||||
|
||||
if( ret != 0 )
|
||||
return( ret );
|
||||
|
||||
return( mbedtls_hmac_drbg_write_seed_file( ctx, path ) );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue