diff --git a/library/pk.c b/library/pk.c index d1bd2158b9..a1c7c1d2e0 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 e7a52afb52..3821bae79f 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 268721e7b6..5cdb1c817b 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;