BIO_printf(bio_err, "writing new private key to stdout\n");
else
BIO_printf(bio_err, "writing new private key to '%s'\n", keyout);
- out = bio_open_owner(keyout, "w", private);
+ out = bio_open_owner(keyout, outformat, private);
if (out == NULL)
goto end;
}
if (!newreq) {
- in = bio_open_default(infile, RB(informat));
+ in = bio_open_default(infile, 'r', informat);
if (in == NULL)
goto end;
out = bio_open_default(outfile,
keyout != NULL && outfile != NULL &&
- strcmp(keyout, outfile) == 0 ? "a" : "w");
+ strcmp(keyout, outfile) == 0 ? 'a' : 'w',
+ outformat);
if (out == NULL)
goto end;