X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fecparam.c;h=2290242310d194da4284933f81fc268f1a272d44;hp=1f3770e2847d40bb54459f5f08075df6601aa8e9;hb=06deb93286ac5f125fc81ddc9260b9de2311c7f3;hpb=cbe2964821bb063f61ed2544cfce196ec1c0d62b diff --git a/apps/ecparam.c b/apps/ecparam.c index 1f3770e284..2290242310 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use @@ -18,6 +18,7 @@ NON_EMPTY_TRANSLATION_UNIT # include # include # include "apps.h" +# include "progs.h" # include # include # include @@ -383,6 +384,9 @@ int ecparam_main(int argc, char **argv) "}\n"); } + if (outformat == FORMAT_ASN1 && genkey) + noout = 1; + if (!noout) { if (outformat == FORMAT_ASN1) i = i2d_ECPKParameters_bio(out, group); @@ -409,6 +413,9 @@ int ecparam_main(int argc, char **argv) goto end; } + if (new_form) + EC_KEY_set_conv_form(eckey, form); + if (!EC_KEY_generate_key(eckey)) { BIO_printf(bio_err, "unable to generate key\n"); EC_KEY_free(eckey);