diff options
| author | tb <> | 2023-04-22 20:50:26 +0000 |
|---|---|---|
| committer | tb <> | 2023-04-22 20:50:26 +0000 |
| commit | 11825ca98103ac2b6c1991895202722b4cc3cf55 (patch) | |
| tree | 8b26b440385ec8e3a1dceed718d5345841a4a1b4 /src | |
| parent | d95935343b3c1b937475cb005227b89d04313ff9 (diff) | |
| download | openbsd-11825ca98103ac2b6c1991895202722b4cc3cf55.tar.gz openbsd-11825ca98103ac2b6c1991895202722b4cc3cf55.tar.bz2 openbsd-11825ca98103ac2b6c1991895202722b4cc3cf55.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/openssl/apps.c | 8 |
1 files 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 @@ | |||
| 1 | /* $OpenBSD: apps.c,v 1.63 2023/04/14 15:27:13 tb Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.64 2023/04/22 20:50:26 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -933,7 +933,11 @@ set_name_ex(unsigned long *flags, const char *arg) | |||
| 933 | {"ca_default", XN_FLAG_MULTILINE, 0xffffffffL}, | 933 | {"ca_default", XN_FLAG_MULTILINE, 0xffffffffL}, |
| 934 | {NULL, 0, 0} | 934 | {NULL, 0, 0} |
| 935 | }; | 935 | }; |
| 936 | return set_multi_opts(flags, arg, ex_tbl); | 936 | if (!set_multi_opts(flags, arg, ex_tbl)) |
| 937 | return 0; | ||
| 938 | if (*flags != XN_FLAG_COMPAT && (*flags & XN_FLAG_SEP_MASK) == 0) | ||
| 939 | *flags |= XN_FLAG_SEP_CPLUS_SPC; | ||
| 940 | return 1; | ||
| 937 | } | 941 | } |
| 938 | 942 | ||
| 939 | int | 943 | int |
