Check ASN1_INTEGER_get for errors.
[openssl.git] / apps / genpkey.c
index de14bd3810fe88aefced724540327286253c505c..7c8d5518276ed5436c50978e3307e1e042e621f4 100644 (file)
@@ -89,6 +89,7 @@ OPTIONS genpkey_options[] = {
 #ifndef OPENSSL_NO_ENGINE
     {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"},
 #endif
+    /* This is deliberately last. */
     {OPT_HELP_STR, 1, 1,
      "Order of options may be important!  See the documentation.\n"},
     {NULL}
@@ -179,6 +180,9 @@ int genpkey_main(int argc, char **argv)
         goto end;
     }
 
+    if (!app_load_modules(NULL))
+        goto end;
+
     out = bio_open_default(outfile, "wb");
     if (out == NULL)
         goto end;