summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-05-08 05:30:38 +0000
committertb <>2023-05-08 05:30:38 +0000
commite94901686eee3ed454b13711dad402696c298bc0 (patch)
tree967419dcf0d68c70d1fd537b473d81433136b5a7
parente038ec4b651018aaafb0962a7d03a57086d95436 (diff)
downloadopenbsd-e94901686eee3ed454b13711dad402696c298bc0.tar.gz
openbsd-e94901686eee3ed454b13711dad402696c298bc0.tar.bz2
openbsd-e94901686eee3ed454b13711dad402696c298bc0.zip
Avoid trailing whitespace in extension printing
If an extension is non-critical, X509V3_extensions_print() would leave trailing whitespace. This can be trivially avoided. ok miod
-rw-r--r--src/lib/libcrypto/x509/x509_prn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_prn.c b/src/lib/libcrypto/x509/x509_prn.c
index 2d7afb9fcc..3bf7c803e5 100644
--- a/src/lib/libcrypto/x509/x509_prn.c
+++ b/src/lib/libcrypto/x509/x509_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_prn.c,v 1.5 2023/02/16 08:38:17 tb Exp $ */ 1/* $OpenBSD: x509_prn.c,v 1.6 2023/05/08 05:30:38 tb 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 1999. 3 * project 1999.
4 */ 4 */
@@ -178,7 +178,7 @@ X509V3_extensions_print(BIO *bp, const char *title,
178 obj = X509_EXTENSION_get_object(ex); 178 obj = X509_EXTENSION_get_object(ex);
179 i2a_ASN1_OBJECT(bp, obj); 179 i2a_ASN1_OBJECT(bp, obj);
180 j = X509_EXTENSION_get_critical(ex); 180 j = X509_EXTENSION_get_critical(ex);
181 if (BIO_printf(bp, ": %s\n",j?"critical":"") <= 0) 181 if (BIO_printf(bp, ":%s\n", j ? " critical" : "") <= 0)
182 return 0; 182 return 0;
183 if (!X509V3_EXT_print(bp, ex, flag, indent + 4)) { 183 if (!X509V3_EXT_print(bp, ex, flag, indent + 4)) {
184 BIO_printf(bp, "%*s", indent + 4, ""); 184 BIO_printf(bp, "%*s", indent + 4, "");