-/* $OpenBSD: bn_print.c,v 1.40 2023/07/06 14:37:39 tb Exp $ */
+/* $OpenBSD: bn_print.c,v 1.41 2023/07/07 06:41:59 tb Exp $ */
/*
* Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
if (BIO_printf(bio, "\n%*s", indent, "") <= 0)
goto err;
}
+ /* First nibble has the high bit set. Insert leading 0 octet. */
+ if (octets == 1 && hi >= '8') {
+ if (BIO_printf(bio, "00:") <= 0)
+ goto err;
+ octets++;
+ }
if (CBS_len(&cbs) == 0)
sep = "";
if (BIO_printf(bio, "%c%c%s", tolower(hi), tolower(lo), sep) <= 0)