Missing dependencies on POLARSSL_ECP_C fixed

This commit is contained in:
Paul Bakker 2014-08-18 12:00:28 +02:00
parent 09c9dd80ef
commit d153ef335f
2 changed files with 33 additions and 14 deletions

View file

@ -64,11 +64,16 @@ int main( int argc, char *argv[] )
#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 @@ int main( int argc, char *argv[] )
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 )