Fix some dependencies/warnings in programs
diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c
index 5732f50..d487739 100644
--- a/programs/pkey/dh_genprime.c
+++ b/programs/pkey/dh_genprime.c
@@ -43,22 +43,22 @@
#define GENERATOR "4"
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
- !defined(POLARSSL_FS_IO) || !defined(POLARSSL_CTR_DRBG_C)
+ !defined(POLARSSL_FS_IO) || !defined(POLARSSL_CTR_DRBG_C) || \
+ !defined(POLARSSL_GENPRIME)
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or "
- "POLARSSL_FS_IO and/or POLARSSL_CTR_DRBG_C not defined.\n");
+ "POLARSSL_FS_IO and/or POLARSSL_CTR_DRBG_C and/or "
+ "POLARSSL_GENPRIME not defined.\n");
return( 0 );
}
#else
int main( int argc, char *argv[] )
{
int ret = 1;
-
-#if defined(POLARSSL_GENPRIME)
mpi G, P, Q;
entropy_context entropy;
ctr_drbg_context ctr_drbg;
@@ -147,9 +147,6 @@
exit:
mpi_free( &G ); mpi_free( &P ); mpi_free( &Q );
-#else
- printf( "\n ! Prime-number generation is not available.\n\n" );
-#endif
#if defined(_WIN32)
printf( " Press Enter to exit this program.\n" );
@@ -159,4 +156,4 @@
return( ret );
}
#endif /* POLARSSL_BIGNUM_C && POLARSSL_ENTROPY_C && POLARSSL_FS_IO &&
- POLARSSL_CTR_DRBG_C */
+ POLARSSL_CTR_DRBG_C && POLARSSL_GENPRIME */