EVP_PKEY *pkey = NULL;
int text = 0, noout = 0, ret = 1;
OPTION_CHOICE o;
- char *infile = NULL, *outfile = NULL, *prog, *engine = NULL;
+ char *infile = NULL, *outfile = NULL, *prog;
prog = opt_init(argc, argv, pkeyparam_options);
while ((o = opt_next()) != OPT_EOF) {
outfile = opt_arg();
break;
case OPT_ENGINE:
- engine = opt_arg();
+ (void)setup_engine(opt_arg(), 0);
break;
case OPT_TEXT:
text = 1;
argc = opt_num_rest();
argv = opt_rest();
-#ifndef OPENSSL_NO_ENGINE
- setup_engine(engine, 0);
-#endif
+ if (!app_load_modules(NULL))
+ goto end;
- in = bio_open_default(infile, "r");
+ in = bio_open_default(infile, 'r', FORMAT_PEM);
if (in == NULL)
goto end;
- out = bio_open_default(outfile, "w");
+ out = bio_open_default(outfile, 'w', FORMAT_PEM);
if (out == NULL)
goto end;
pkey = PEM_read_bio_Parameters(in, NULL);