Fix depends_on:pk_alg in test suites
diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function
index ee3516a..953c633 100644
--- a/tests/suites/test_suite_rsa.function
+++ b/tests/suites/test_suite_rsa.function
@@ -163,6 +163,7 @@
TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 );
+#if defined(MBEDTLS_PKCS1_V15)
/* For PKCS#1 v1.5, there is an alternative way to generate signatures */
if( padding_mode == MBEDTLS_RSA_PKCS_V15 )
{
@@ -186,6 +187,7 @@
TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 );
}
}
+#endif /* MBEDTLS_PKCS1_V15 */
exit:
mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P );
@@ -207,7 +209,7 @@
unsigned char result_str[1000];
unsigned char output[1000];
mbedtls_rsa_context ctx;
- size_t hash_len, olen;
+ size_t hash_len;
mbedtls_mpi N, E;
mbedtls_mpi_init( &N ); mbedtls_mpi_init( &E );
@@ -234,10 +236,12 @@
hash_len, hash_result,
result_str ) == correct );
+#if defined(MBEDTLS_PKCS1_V15)
/* For PKCS#1 v1.5, there is an alternative way to verify signatures */
if( padding_mode == MBEDTLS_RSA_PKCS_V15 )
{
int ok;
+ size_t olen;
res = mbedtls_rsa_rsaes_pkcs1_v15_decrypt( &ctx,
NULL, NULL, MBEDTLS_RSA_PUBLIC,
@@ -259,6 +263,7 @@
TEST_ASSERT( ok == 0 );
}
}
+#endif /* MBEDTLS_PKCS1_V15 */
exit:
mbedtls_mpi_free( &N ); mbedtls_mpi_free( &E );