From 2234212c3dde887e0b7fa08277d035cd132e2cce Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 13 Jun 2017 01:24:02 +0800 Subject: Clean up a bundle of codingstyle stuff in apps directory Mostly braces and NULL pointer check and also copyright year bump Signed-off-by: Paul Yang Reviewed-by: Kurt Roeckx Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3657) --- apps/ecparam.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'apps/ecparam.c') diff --git a/apps/ecparam.c b/apps/ecparam.c index 7d4cef1006..a3696c9d95 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -232,8 +232,9 @@ int ecparam_main(int argc, char **argv) BIO_printf(bio_err, "using curve name prime256v1 " "instead of secp256r1\n"); nid = NID_X9_62_prime256v1; - } else + } else { nid = OBJ_sn2nid(curve_name); + } if (nid == 0) nid = EC_curve_nist2nid(curve_name); @@ -250,10 +251,11 @@ int ecparam_main(int argc, char **argv) } EC_GROUP_set_asn1_flag(group, asn1_flag); EC_GROUP_set_point_conversion_form(group, form); - } else if (informat == FORMAT_ASN1) + } else if (informat == FORMAT_ASN1) { group = d2i_ECPKParameters_bio(in, NULL); - else + } else { group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL); + } if (group == NULL) { BIO_printf(bio_err, "unable to load elliptic curve parameters\n"); ERR_print_errors(bio_err); -- cgit v1.2.1