}
if (!noout || text) {
- const char* modeflag = "w";
- if (outformat == FORMAT_ASN1 || outformat == FORMAT_NSS)
- modeflag = "wb";
- out = bio_open_default(outfile, modeflag);
+ out = bio_open_default(outfile, 'w', outformat);
if (out == NULL)
goto end;
}
ret = 0;
end:
BIO_free_all(out);
- if (x != NULL)
- SSL_SESSION_free(x);
+ SSL_SESSION_free(x);
return (ret);
}
SSL_SESSION *x = NULL;
BIO *in = NULL;
- in = bio_open_default(infile, RB(format));
+ in = bio_open_default(infile, 'r', format);
if (in == NULL)
goto end;
if (format == FORMAT_ASN1)