diff --git a/library/error.c b/library/error.c index dc02038bd..d4d8500da 100644 --- a/library/error.c +++ b/library/error.c @@ -95,6 +95,10 @@ #include "polarssl/padlock.h" #endif +#if defined(POLARSSL_PBKDF2_C) +#include "polarssl/pbkdf2.h" +#endif + #if defined(POLARSSL_PEM_C) #include "polarssl/pem.h" #endif @@ -516,6 +520,11 @@ void error_strerror( int ret, char *buf, size_t buflen ) snprintf( buf, buflen, "PADLOCK - Input data should be aligned" ); #endif /* POLARSSL_PADLOCK_C */ +#if defined(POLARSSL_PBKDF2_C) + if( use_ret == -(POLARSSL_ERR_PBKDF2_BAD_INPUT_DATA) ) + snprintf( buf, buflen, "PBKDF2 - Bad input parameters to function" ); +#endif /* POLARSSL_PBKDF2_C */ + #if defined(POLARSSL_SHA1_C) if( use_ret == -(POLARSSL_ERR_SHA1_FILE_IO_ERROR) ) snprintf( buf, buflen, "SHA1 - Read/write error in file" ); diff --git a/scripts/generate_errors.pl b/scripts/generate_errors.pl index a4e5233e5..e89496490 100755 --- a/scripts/generate_errors.pl +++ b/scripts/generate_errors.pl @@ -9,7 +9,7 @@ my $error_file = shift or die "Missing destination file"; my $error_format_file = $data_dir.'/error.fmt'; my @low_level_modules = ( "AES", "ASN1", "BLOWFISH", "CAMELLIA", "BIGNUM", - "BASE64", "XTEA", + "BASE64", "XTEA", "PBKDF2", "PADLOCK", "DES", "NET", "CTR_DRBG", "ENTROPY", "MD2", "MD4", "MD5", "SHA1", "SHA2", "SHA4", "GCM" ); my @high_level_modules = ( "PEM", "X509", "DHM", "RSA", "MD", "CIPHER", "SSL" );