- Updated strerror codes for SSL Compression and Blowfish
diff --git a/library/error.c b/library/error.c
index 4528ea1..dc02038 100644
--- a/library/error.c
+++ b/library/error.c
@@ -39,6 +39,10 @@
#include "polarssl/bignum.h"
#endif
+#if defined(POLARSSL_BLOWFISH_C)
+#include "polarssl/blowfish.h"
+#endif
+
#if defined(POLARSSL_CAMELLIA_C)
#include "polarssl/camellia.h"
#endif
@@ -293,6 +297,8 @@
snprintf( buf, buflen, "SSL - Hardware acceleration function returned with error" );
if( use_ret == -(POLARSSL_ERR_SSL_HW_ACCEL_FALLTHROUGH) )
snprintf( buf, buflen, "SSL - Hardware acceleration function skipped / left alone data" );
+ if( use_ret == -(POLARSSL_ERR_SSL_COMPRESSION_FAILED) )
+ snprintf( buf, buflen, "SSL - Processing of the compression / decompression failed" );
#endif /* POLARSSL_SSL_TLS_C */
#if defined(POLARSSL_X509_PARSE_C)
@@ -419,6 +425,13 @@
snprintf( buf, buflen, "BIGNUM - Memory allocation failed" );
#endif /* POLARSSL_BIGNUM_C */
+#if defined(POLARSSL_BLOWFISH_C)
+ if( use_ret == -(POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH) )
+ snprintf( buf, buflen, "BLOWFISH - Invalid key length" );
+ if( use_ret == -(POLARSSL_ERR_BLOWFISH_INVALID_INPUT_LENGTH) )
+ snprintf( buf, buflen, "BLOWFISH - Invalid data input length" );
+#endif /* POLARSSL_BLOWFISH_C */
+
#if defined(POLARSSL_CAMELLIA_C)
if( use_ret == -(POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH) )
snprintf( buf, buflen, "CAMELLIA - Invalid key length" );
diff --git a/scripts/generate_errors.pl b/scripts/generate_errors.pl
index 91dafd6..a4e5233 100755
--- a/scripts/generate_errors.pl
+++ b/scripts/generate_errors.pl
@@ -8,7 +8,8 @@
my $error_file = shift or die "Missing destination file";
my $error_format_file = $data_dir.'/error.fmt';
-my @low_level_modules = ( "AES", "ASN1", "CAMELLIA", "BIGNUM", "BASE64", "XTEA",
+my @low_level_modules = ( "AES", "ASN1", "BLOWFISH", "CAMELLIA", "BIGNUM",
+ "BASE64", "XTEA",
"PADLOCK", "DES", "NET", "CTR_DRBG", "ENTROPY",
"MD2", "MD4", "MD5", "SHA1", "SHA2", "SHA4", "GCM" );
my @high_level_modules = ( "PEM", "X509", "DHM", "RSA", "MD", "CIPHER", "SSL" );