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)
This commit is contained in:
Shane Lontis 2020-09-21 11:09:10 +10:00
parent d65ab22efd
commit ad2dbfb543

View File

@ -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 */