X509_NAME_print() is documented to print things at a given indentation
level. Unfortunately, this never worked since someone got some logic
wrong. Part of the wrong logic was removed in a dead code removal in
OpenSSL commit
92ada7cc, but the variable l was left behind, which leads
to compiler warnings on some platforms. End its sad life pointlessly
and incorrectly measuring column width and remove it.
ok jsing
-/* $OpenBSD: t_x509.c,v 1.39 2022/08/10 16:51:26 tb Exp $ */
+/* $OpenBSD: t_x509.c,v 1.40 2022/08/11 10:36:32 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
{
char *s, *c, *b;
- int ret = 0, l, i;
-
- l = 80 - 2 - obase;
+ int i;
+ int ret = 0;
b = X509_NAME_oneline(name, NULL, 0);
if (b == NULL)
if (BIO_write(bp, ", ", 2) != 2)
goto err;
}
- l--;
}
if (*s == '\0')
break;
s++;
- l--;
}
ret = 1;