From 084d2d58ab1ea099b3bda370c465bddb69c5040a Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 22 Apr 2023 20:50:26 +0000 Subject: Fix UTF-8 issuer printing If no field separator is specified, default to using the comma plus space separation, unless the compat flag is set. Fixes an a bug with printing issuers and other things that contain UTF-8 Reported by Jean-Luc Duprat The very simple fix ix is a joint effort by Henson and Levitte Fixes libressl/portable issue #845 ok jsing --- src/usr.bin/openssl/apps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index 592a68980a..f5f1248c07 100644 --- a/src/usr.bin/openssl/apps.c +++ b/src/usr.bin/openssl/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.63 2023/04/14 15:27:13 tb Exp $ */ +/* $OpenBSD: apps.c,v 1.64 2023/04/22 20:50:26 tb Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -933,7 +933,11 @@ set_name_ex(unsigned long *flags, const char *arg) {"ca_default", XN_FLAG_MULTILINE, 0xffffffffL}, {NULL, 0, 0} }; - return set_multi_opts(flags, arg, ex_tbl); + if (!set_multi_opts(flags, arg, ex_tbl)) + return 0; + if (*flags != XN_FLAG_COMPAT && (*flags & XN_FLAG_SEP_MASK) == 0) + *flags |= XN_FLAG_SEP_CPLUS_SPC; + return 1; } int -- cgit v1.2.3-55-g6feb