From dfab4c1193f87e3addaab0ac91dd5a2e929bc402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 22 Jan 2014 15:45:04 +0100 Subject: [PATCH] Add forgotten #ifdef and depends_on --- library/pk.c | 2 ++ tests/suites/test_suite_pk.data | 1 - tests/suites/test_suite_pk.function | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/library/pk.c b/library/pk.c index d1bd2158b..a1c7c1d2e 100644 --- a/library/pk.c +++ b/library/pk.c @@ -108,6 +108,7 @@ int pk_init_ctx( pk_context *ctx, const pk_info_t *info ) return( 0 ); } +#if defined(POLARSSL_RSA_C) /* * Set RSA padding */ @@ -121,6 +122,7 @@ int pk_rsa_set_padding( pk_context *ctx, int padding, int hash_id ) return( 0 ); } +#endif /* POLARSSL_RSA_C */ /* * Initialize an RSA-alt context diff --git a/tests/suites/test_suite_pk.data b/tests/suites/test_suite_pk.data index e7a52afb5..3821bae79 100644 --- a/tests/suites/test_suite_pk.data +++ b/tests/suites/test_suite_pk.data @@ -15,7 +15,6 @@ depends_on:POLARSSL_ECDSA_C:POLARSSL_ECP_DP_SECP192R1_ENABLED pk_utils:POLARSSL_PK_ECDSA:192:24:"ECDSA" PK RSA padding: RSA (ok) -depends_on:POLARSSL_RSA_C pk_set_rsa_padding:POLARSSL_PK_RSA:RSA_PKCS_V21:POLARSSL_MD_SHA512:0 PK RSA padding: ECKEY (error) diff --git a/tests/suites/test_suite_pk.function b/tests/suites/test_suite_pk.function index 268721e7b..5cdb1c817 100644 --- a/tests/suites/test_suite_pk.function +++ b/tests/suites/test_suite_pk.function @@ -54,7 +54,7 @@ void pk_utils( int type, int size, int len, char *name ) } /* END_CASE */ -/* BEGIN_CASE */ +/* BEGIN_CASE depends_on:POLARSSL_RSA_C */ void pk_set_rsa_padding( int type, int padding, int hash_id, int ret ) { pk_context pk;