diff options
-rw-r--r-- | src/lib/libcrypto/dh/dh_ameth.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c index eaca890a50..0df7fbc739 100644 --- a/src/lib/libcrypto/dh/dh_ameth.c +++ b/src/lib/libcrypto/dh/dh_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_ameth.c,v 1.22 2022/01/10 12:10:26 tb Exp $ */ | 1 | /* $OpenBSD: dh_ameth.c,v 1.23 2022/01/20 11:00:34 inoguchi Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -353,7 +353,8 @@ do_dh_print(BIO *bp, const DH *x, int indent, ASN1_PCTX *ctx, int ptype) | |||
353 | goto err; | 353 | goto err; |
354 | } | 354 | } |
355 | 355 | ||
356 | BIO_indent(bp, indent, 128); | 356 | if (!BIO_indent(bp, indent, 128)) |
357 | goto err; | ||
357 | if (BIO_printf(bp, "%s: (%d bit)\n", ktype, BN_num_bits(x->p)) <= 0) | 358 | if (BIO_printf(bp, "%s: (%d bit)\n", ktype, BN_num_bits(x->p)) <= 0) |
358 | goto err; | 359 | goto err; |
359 | indent += 4; | 360 | indent += 4; |
@@ -368,7 +369,8 @@ do_dh_print(BIO *bp, const DH *x, int indent, ASN1_PCTX *ctx, int ptype) | |||
368 | if (!ASN1_bn_print(bp, "generator:", x->g, m, indent)) | 369 | if (!ASN1_bn_print(bp, "generator:", x->g, m, indent)) |
369 | goto err; | 370 | goto err; |
370 | if (x->length != 0) { | 371 | if (x->length != 0) { |
371 | BIO_indent(bp, indent, 128); | 372 | if (!BIO_indent(bp, indent, 128)) |
373 | goto err; | ||
372 | if (BIO_printf(bp, "recommended-private-length: %d bits\n", | 374 | if (BIO_printf(bp, "recommended-private-length: %d bits\n", |
373 | (int)x->length) <= 0) | 375 | (int)x->length) <= 0) |
374 | goto err; | 376 | goto err; |