char *inrand = NULL, *dsaparams = NULL;
char *outfile = NULL, *passoutarg = NULL, *passout = NULL, *prog;
OPTION_CHOICE o;
- int ret = 1;
+ int ret = 1, private = 0;
prog = opt_init(argc, argv, gendsa_options);
while ((o = opt_next()) != OPT_EOF) {
}
argc = opt_num_rest();
argv = opt_rest();
+ private = 1;
if (argc != 1)
goto opthelp;
BIO_free(in);
in = NULL;
- out = bio_open_default(outfile, "w");
+ out = bio_open_owner(outfile, "w", private);
if (out == NULL)
goto end2;
app_RAND_write_file(NULL);
+ assert(private);
if (!PEM_write_bio_DSAPrivateKey(out, dsa, enc, NULL, 0, NULL, passout))
goto end;
ret = 0;