Fix depend issues in test suites for cipher modes
diff --git a/ChangeLog b/ChangeLog
index f131280..6995003 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* Fixed testing with out-of-source builds using cmake
* Fixed version-major intolerance in server
* Fixed CMake symlinking on out-of-source builds
+ * Fixed dependency issues in test suite
= PolarSSL 1.3.4 released on 2014-01-27
Features
diff --git a/library/des.c b/library/des.c
index 6e15234..7da3269 100644
--- a/library/des.c
+++ b/library/des.c
@@ -781,11 +781,6 @@
0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23
};
-static const unsigned char des3_test_iv[8] =
-{
- 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF,
-};
-
static const unsigned char des3_test_buf[8] =
{
0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74
@@ -805,6 +800,12 @@
{ 0xDD, 0x17, 0xE8, 0xB8, 0xB4, 0x37, 0xD2, 0x32 }
};
+#if defined(POLARSSL_CIPHER_MODE_CBC)
+static const unsigned char des3_test_iv[8] =
+{
+ 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF,
+};
+
static const unsigned char des3_test_cbc_dec[3][8] =
{
{ 0x12, 0x9F, 0x40, 0xB9, 0xD2, 0x00, 0x56, 0xB3 },
@@ -818,6 +819,7 @@
{ 0x35, 0x76, 0x11, 0x56, 0x5F, 0xA1, 0x8E, 0x4D },
{ 0xCB, 0x19, 0x1F, 0x85, 0xD1, 0xED, 0x84, 0x39 }
};
+#endif /* POLARSSL_CIPHER_MODE_CBC */
/*
* Checkup routine
diff --git a/tests/suites/test_suite_blowfish.function b/tests/suites/test_suite_blowfish.function
index edfd306..673b88c 100644
--- a/tests/suites/test_suite_blowfish.function
+++ b/tests/suites/test_suite_blowfish.function
@@ -136,7 +136,7 @@
}
/* END_CASE */
-/* BEGIN_CASE */
+/* BEGIN_CASE depends_on:POLARSSL_CIPHER_MODE_CFB */
void blowfish_encrypt_cfb64( char *hex_key_string, char *hex_iv_string,
char *hex_src_string, char *hex_dst_string )
{
@@ -167,7 +167,7 @@
}
/* END_CASE */
-/* BEGIN_CASE */
+/* BEGIN_CASE depends_on:POLARSSL_CIPHER_MODE_CFB */
void blowfish_decrypt_cfb64( char *hex_key_string, char *hex_iv_string,
char *hex_src_string, char *hex_dst_string )
{
@@ -198,7 +198,7 @@
}
/* END_CASE */
-/* BEGIN_CASE */
+/* BEGIN_CASE depends_on:POLARSSL_CIPHER_MODE_CTR */
void blowfish_encrypt_ctr( char *hex_key_string, char *hex_iv_string,
char *hex_src_string, char *hex_dst_string )
{
diff --git a/tests/suites/test_suite_camellia.function b/tests/suites/test_suite_camellia.function
index 59785d2..8f9e978 100644
--- a/tests/suites/test_suite_camellia.function
+++ b/tests/suites/test_suite_camellia.function
@@ -135,7 +135,7 @@
}
/* END_CASE */
-/* BEGIN_CASE */
+/* BEGIN_CASE depends_on:POLARSSL_CIPHER_MODE_CFB */
void camellia_encrypt_cfb128( char *hex_key_string, char *hex_iv_string,
char *hex_src_string, char *hex_dst_string )
{
@@ -166,7 +166,7 @@
}
/* END_CASE */
-/* BEGIN_CASE */
+/* BEGIN_CASE depends_on:POLARSSL_CIPHER_MODE_CFB */
void camellia_decrypt_cfb128( char *hex_key_string, char *hex_iv_string,
char *hex_src_string, char *hex_dst_string )
{