Missing 'else' in gen_key
diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c
index e7dab24..2a33257 100644
--- a/programs/pkey/gen_key.c
+++ b/programs/pkey/gen_key.c
@@ -170,7 +170,7 @@
         {
             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;