Fixes #26519
This is a regression from commit
1dbb67c4
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26525)
if (!app_RAND_load())
goto end;
+ if (list_curves) {
+ out = bio_open_owner(outfile, outformat, private);
+ if (out == NULL)
+ goto end;
+
+ if (list_builtin_curves(out))
+ ret = 0;
+ goto end;
+ }
+
private = genkey ? 1 : 0;
if (curve_name != NULL) {
if (out == NULL)
goto end;
- if (list_curves) {
- if (list_builtin_curves(out))
- ret = 0;
- goto end;
- }
-
if (text
&& EVP_PKEY_print_params(out, params_key, 0, NULL) <= 0) {
BIO_printf(bio_err, "unable to print params\n");