Missing dependencies on POLARSSL_ECP_C fixed
diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c
index 767d621..9a0d079 100644
--- a/programs/pkey/gen_key.c
+++ b/programs/pkey/gen_key.c
@@ -64,11 +64,16 @@
#define DFL_TYPE POLARSSL_PK_RSA
#define DFL_RSA_KEYSIZE 4096
-#define DFL_EC_CURVE ecp_curve_list()->grp_id
#define DFL_FILENAME "keyfile.key"
#define DFL_FORMAT FORMAT_PEM
#define DFL_USE_DEV_RANDOM 0
+#if defined(POLARSSL_ECP_C)
+#define DFL_EC_CURVE ecp_curve_list()->grp_id
+#else
+#define DFL_EC_CURVE 0
+#endif
+
/*
* global options
*/
@@ -252,12 +257,14 @@
opt.rsa_keysize > POLARSSL_MPI_MAX_BITS )
goto usage;
}
+#if defined(POLARSSL_ECP_C)
else if( strcmp( p, "ec_curve" ) == 0 )
{
if( ( curve_info = ecp_curve_info_from_name( q ) ) == NULL )
goto usage;
opt.ec_curve = curve_info->grp_id;
}
+#endif
else if( strcmp( p, "filename" ) == 0 )
opt.filename = q;
else if( strcmp( p, "use_dev_random" ) == 0 )