diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c index e7dab2468..2a332577a 100644 --- a/programs/pkey/gen_key.c +++ b/programs/pkey/gen_key.c @@ -170,7 +170,7 @@ int main( int argc, char *argv[] ) { if( strcmp( q, "rsa" ) == 0 ) opt.type = POLARSSL_PK_RSA; - if( strcmp( q, "ec" ) == 0 ) + else if( strcmp( q, "ec" ) == 0 ) opt.type = POLARSSL_PK_ECKEY; else goto usage;