diff options
author | Paul Yang <paulyang.inf@gmail.com> | 2017-06-12 19:24:02 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-06-12 22:11:05 +0200 |
commit | 2234212c3dde887e0b7fa08277d035cd132e2cce (patch) | |
tree | b786145f72f8938a11d4c6fc6ff815e0ae6c43a4 /apps/ecparam.c | |
parent | Fix a memleak in tls13_generate_secret. (diff) | |
download | openssl-2234212c3dde887e0b7fa08277d035cd132e2cce.tar.xz openssl-2234212c3dde887e0b7fa08277d035cd132e2cce.zip |
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 <paulyang.inf@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3657)
Diffstat (limited to 'apps/ecparam.c')
-rw-r--r-- | apps/ecparam.c | 10 |
1 files changed, 6 insertions, 4 deletions
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); |