summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_print.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c
index 466aeb3d64..18984d7d4f 100644
--- a/src/lib/libcrypto/bn/bn_print.c
+++ b/src/lib/libcrypto/bn/bn_print.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_print.c,v 1.40 2023/07/06 14:37:39 tb Exp $ */ 1/* $OpenBSD: bn_print.c,v 1.41 2023/07/07 06:41:59 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
@@ -102,6 +102,12 @@ bn_print_bignum(BIO *bio, const BIGNUM *bn, int indent)
102 if (BIO_printf(bio, "\n%*s", indent, "") <= 0) 102 if (BIO_printf(bio, "\n%*s", indent, "") <= 0)
103 goto err; 103 goto err;
104 } 104 }
105 /* First nibble has the high bit set. Insert leading 0 octet. */
106 if (octets == 1 && hi >= '8') {
107 if (BIO_printf(bio, "00:") <= 0)
108 goto err;
109 octets++;
110 }
105 if (CBS_len(&cbs) == 0) 111 if (CBS_len(&cbs) == 0)
106 sep = ""; 112 sep = "";
107 if (BIO_printf(bio, "%c%c%s", tolower(hi), tolower(lo), sep) <= 0) 113 if (BIO_printf(bio, "%c%c%s", tolower(hi), tolower(lo), sep) <= 0)