diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-09-21 11:09:10 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-09-23 17:16:38 +1000 |
commit | ad2dbfb543ac1ba9c074fccd75c06b1d5d491393 (patch) | |
tree | 1539472a67154f67c9d2be6d9d0ff73591cea8fd /providers/implementations/encode_decode | |
parent | d65ab22efdc707a3b8747d8827e2a92eafeaf786 (diff) |
Fix CID 1466713 : Dead code in encode_key2text.c
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12930)
Diffstat (limited to 'providers/implementations/encode_decode')
-rw-r--r-- | providers/implementations/encode_decode/encode_key2text.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/providers/implementations/encode_decode/encode_key2text.c b/providers/implementations/encode_decode/encode_key2text.c index 2cf4fab95f..d5e8019081 100644 --- a/providers/implementations/encode_decode/encode_key2text.c +++ b/providers/implementations/encode_decode/encode_key2text.c @@ -390,23 +390,20 @@ static int ec_param_explicit_gen_to_text(BIO *out, const EC_GROUP *group, || EC_POINT_point2bn(group, point, form, gen, ctx) == NULL) return 0; - if (gen != NULL) { - switch (form) { - case POINT_CONVERSION_COMPRESSED: - glabel = "Generator (compressed):"; - break; - case POINT_CONVERSION_UNCOMPRESSED: - glabel = "Generator (uncompressed):"; - break; - case POINT_CONVERSION_HYBRID: - glabel = "Generator (hybrid):"; - break; - default: - return 0; - } - return print_labeled_bignum(out, glabel, gen); + switch (form) { + case POINT_CONVERSION_COMPRESSED: + glabel = "Generator (compressed):"; + break; + case POINT_CONVERSION_UNCOMPRESSED: + glabel = "Generator (uncompressed):"; + break; + case POINT_CONVERSION_HYBRID: + glabel = "Generator (hybrid):"; + break; + default: + return 0; } - return 1; + return print_labeled_bignum(out, glabel, gen); } /* Print explicit parameters */ |