}
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, WB(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);
}