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

@ -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