summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/apps/ecparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/apps/ecparam.c')
-rw-r--r--deps/openssl/openssl/apps/ecparam.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/deps/openssl/openssl/apps/ecparam.c b/deps/openssl/openssl/apps/ecparam.c
index a9bf489cdd..8d5b704448 100644
--- a/deps/openssl/openssl/apps/ecparam.c
+++ b/deps/openssl/openssl/apps/ecparam.c
@@ -3,7 +3,7 @@
* Written by Nils Larsch for the OpenSSL project.
*/
/* ====================================================================
- * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -546,6 +546,9 @@ int MAIN(int argc, char **argv)
BIO_printf(out, "\treturn(group);\n\t}\n");
}
+ if (outformat == FORMAT_ASN1 && genkey)
+ noout = 1;
+
if (!noout) {
if (outformat == FORMAT_ASN1)
i = i2d_ECPKParameters_bio(out, group);
@@ -582,6 +585,9 @@ int MAIN(int argc, char **argv)
if (EC_KEY_set_group(eckey, group) == 0)
goto end;
+ if (new_form)
+ EC_KEY_set_conv_form(eckey, form);
+
if (!EC_KEY_generate_key(eckey)) {
EC_KEY_free(eckey);
goto end;