diff options
Diffstat (limited to 'apps/ecparam.c')
-rw-r--r-- | apps/ecparam.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/ecparam.c b/apps/ecparam.c index 122125ee4e..b90247cc80 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -462,11 +462,17 @@ int ecparam_main(int argc, char **argv) assert(need_rand); - if (EC_KEY_set_group(eckey, group) == 0) + if (EC_KEY_set_group(eckey, group) == 0) { + BIO_printf(bio_err, "unable to set group when generating key\n"); + EC_KEY_free(eckey); + ERR_print_errors(bio_err); goto end; + } if (!EC_KEY_generate_key(eckey)) { + BIO_printf(bio_err, "unable to generate key\n"); EC_KEY_free(eckey); + ERR_print_errors(bio_err); goto end; } assert(private); |