Fixed dependency on POLARSSL_GENPRIME in PK tests

This commit is contained in:
Paul Bakker 2013-12-19 17:29:52 +01:00
parent 30a3062782
commit a5320904bf
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
PK utils: RSA
depends_on:POLARSSL_RSA_C
depends_on:POLARSSL_RSA_C:POLARSSL_GENPRIME
pk_utils:POLARSSL_PK_RSA:512:64:"RSA"
PK utils: ECKEY
@ -51,7 +51,7 @@ depends_on:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP192R1_ENABLED
pk_sign_verify:POLARSSL_PK_ECKEY_DH:POLARSSL_ERR_PK_TYPE_MISMATCH:POLARSSL_ERR_PK_TYPE_MISMATCH
RSA sign-verify
depends_on:POLARSSL_RSA_C:POLARSSL_PKCS1_V15
depends_on:POLARSSL_RSA_C:POLARSSL_PKCS1_V15:POLARSSL_GENPRIME
pk_sign_verify:POLARSSL_PK_RSA:0:0
RSA encrypt test vector

View File

@ -5,7 +5,9 @@ static int rnd_std_rand( void *rng_state, unsigned char *output, size_t len );
static int pk_genkey( pk_context *pk )
{
#if defined(POLARSSL_RSA_C)
((void) pk);
#if defined(POLARSSL_RSA_C) && defined(POLARSSL_GENPRIME)
if( pk_get_type( pk ) == POLARSSL_PK_RSA )
return rsa_gen_key( pk_rsa( *pk ), rnd_std_rand, NULL, 512, 3 );
#endif