1 --- a/programs/pkey/gen_key.c
2 +++ b/programs/pkey/gen_key.c
3 @@ -155,7 +155,9 @@ int main( int argc, char *argv[] )
6 opt.rsa_keysize = DFL_RSA_KEYSIZE;
7 +#if defined(POLARSSL_ECP_C)
8 opt.ec_curve = DFL_EC_CURVE;
10 opt.filename = DFL_FILENAME;
11 opt.format = DFL_FORMAT;
13 @@ -170,8 +172,10 @@ int main( int argc, char *argv[] )
15 if( strcmp( q, "rsa" ) == 0 )
16 opt.type = POLARSSL_PK_RSA;
17 +#if defined(POLARSSL_ECP_C)
18 if( strcmp( q, "ec" ) == 0 )
19 opt.type = POLARSSL_PK_ECKEY;
24 @@ -190,12 +194,14 @@ int main( int argc, char *argv[] )
25 if( opt.rsa_keysize < 1024 || opt.rsa_keysize > 8192 )
28 +#if defined(POLARSSL_ECP_C)
29 else if( strcmp( p, "ec_curve" ) == 0 )
31 if( ( curve_info = ecp_curve_info_from_name( q ) ) == NULL )
33 opt.ec_curve = curve_info->grp_id;
36 else if( strcmp( p, "filename" ) == 0 )