64 #ifndef OPENSSL_NO_ENGINE
72 #define PROG genpkey_main
74 int MAIN(
int,
char **);
76 int MAIN(
int argc,
char **argv)
79 char **args, *outfile = NULL;
104 while (!badarg && *args && *args[0] ==
'-')
106 if (!strcmp(*args,
"-outform"))
115 else if (!strcmp(*args,
"-pass"))
117 if (!args[1])
goto bad;
120 #ifndef OPENSSL_NO_ENGINE
121 else if (strcmp(*args,
"-engine") == 0)
128 else if (!strcmp (*args,
"-paramfile"))
135 if (!init_keygen_file(
bio_err, &ctx, *args, e))
138 else if (!strcmp (*args,
"-out"))
147 else if (strcmp(*args,
"-algorithm") == 0)
154 else if (strcmp(*args,
"-pkeyopt") == 0)
170 else if (strcmp(*args,
"-genparam") == 0)
176 else if (strcmp(*args,
"-text") == 0)
205 #ifndef OPENSSL_NO_ENGINE
210 BIO_printf(
bio_err,
"-pkeyopt opt:value set the public key algorithm option <opt>\n"
211 " to value <value>\n");
214 BIO_printf(
bio_err,
"NB: options order may be important! See the manual page.\n");
229 "Can't open output file %s\n", outfile);
236 #ifdef OPENSSL_SYS_VMS
323 BIO_puts(err,
"Parameters already set!\n");
330 BIO_printf(err,
"Can't open parameter file %s\n", file);
353 BIO_puts(err,
"Error initializing context\n");
364 const char *algname,
ENGINE *e,
int do_param)
373 BIO_puts(err,
"Algorithm already set!\n");
379 #ifndef OPENSSL_NO_ENGINE
393 #ifndef OPENSSL_NO_ENGINE
416 BIO_printf(err,
"Error initializing %s context\n", algname);