mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 16:55:42 +01:00
- Added handling for CTR_DRBG module
This commit is contained in:
parent
0e04d0e9a3
commit
880ac7eb95
@ -47,6 +47,10 @@
|
|||||||
#include "polarssl/cipher.h"
|
#include "polarssl/cipher.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(POLARSSL_CTR_DRBG_C)
|
||||||
|
#include "polarssl/ctr_drbg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(POLARSSL_DES_C)
|
#if defined(POLARSSL_DES_C)
|
||||||
#include "polarssl/des.h"
|
#include "polarssl/des.h"
|
||||||
#endif
|
#endif
|
||||||
@ -373,6 +377,15 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
|||||||
snprintf( buf, buflen, "CAMELLIA - Invalid data input length" );
|
snprintf( buf, buflen, "CAMELLIA - Invalid data input length" );
|
||||||
#endif /* POLARSSL_CAMELLIA_C */
|
#endif /* POLARSSL_CAMELLIA_C */
|
||||||
|
|
||||||
|
#if defined(POLARSSL_CTR_DRBG_C)
|
||||||
|
if( use_ret == -(POLARSSL_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED) )
|
||||||
|
snprintf( buf, buflen, "CTR_DRBG - The entropy source failed" );
|
||||||
|
if( use_ret == -(POLARSSL_ERR_CTR_DRBG_REQUEST_TOO_BIG) )
|
||||||
|
snprintf( buf, buflen, "CTR_DRBG - Too many random requested in single call" );
|
||||||
|
if( use_ret == -(POLARSSL_ERR_CTR_DRBG_INPUT_TOO_BIG) )
|
||||||
|
snprintf( buf, buflen, "CTR_DRBG - Input too large (Entropy + additional)" );
|
||||||
|
#endif /* POLARSSL_CTR_DRBG_C */
|
||||||
|
|
||||||
#if defined(POLARSSL_DES_C)
|
#if defined(POLARSSL_DES_C)
|
||||||
if( use_ret == -(POLARSSL_ERR_DES_INVALID_INPUT_LENGTH) )
|
if( use_ret == -(POLARSSL_ERR_DES_INVALID_INPUT_LENGTH) )
|
||||||
snprintf( buf, buflen, "DES - The data input has an invalid length" );
|
snprintf( buf, buflen, "DES - The data input has an invalid length" );
|
||||||
|
@ -9,7 +9,7 @@ my $error_file = shift or die "Missing destination file";
|
|||||||
my $error_format_file = $data_dir.'/error.fmt';
|
my $error_format_file = $data_dir.'/error.fmt';
|
||||||
|
|
||||||
my @low_level_modules = ( "AES", "ASN1", "CAMELLIA", "BIGNUM", "BASE64", "XTEA",
|
my @low_level_modules = ( "AES", "ASN1", "CAMELLIA", "BIGNUM", "BASE64", "XTEA",
|
||||||
"PADLOCK", "DES", "NET" );
|
"PADLOCK", "DES", "NET", "CTR_DRBG" );
|
||||||
my @high_level_modules = ( "PEM", "X509", "DHM", "RSA", "MD", "CIPHER", "SSL" );
|
my @high_level_modules = ( "PEM", "X509", "DHM", "RSA", "MD", "CIPHER", "SSL" );
|
||||||
|
|
||||||
my $line_separator = $/;
|
my $line_separator = $/;
|
||||||
@ -42,6 +42,7 @@ while (my $line = <GREP>)
|
|||||||
|
|
||||||
# Fix faulty ones
|
# Fix faulty ones
|
||||||
$module_name = "BIGNUM" if ($module_name eq "MPI");
|
$module_name = "BIGNUM" if ($module_name eq "MPI");
|
||||||
|
$module_name = "CTR_DRBG" if ($module_name eq "CTR");
|
||||||
|
|
||||||
my $define_name = $module_name;
|
my $define_name = $module_name;
|
||||||
$define_name = "X509_PARSE" if ($define_name eq "X509");
|
$define_name = "X509_PARSE" if ($define_name eq "X509");
|
||||||
|
Loading…
Reference in New Issue
Block a user