summaryrefslogtreecommitdiffstats
path: root/providers/implementations/encode_decode/encode_key2text.c
diff options
context:
space:
mode:
Diffstat (limited to 'providers/implementations/encode_decode/encode_key2text.c')
-rw-r--r--providers/implementations/encode_decode/encode_key2text.c29
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 */