diff options
author | Werner Koch <wk@gnupg.org> | 2023-03-16 09:46:05 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2023-03-16 09:46:05 +0100 |
commit | e4ac3e7dec92acce32398f571959c7a33534f0c4 (patch) | |
tree | efe905888d31623d76bae0e90da79978794cf94e /sm/certdump.c | |
parent | gpgtar: Do not allow the use of stdout for --status-fd (diff) | |
download | gnupg2-e4ac3e7dec92acce32398f571959c7a33534f0c4.tar.xz gnupg2-e4ac3e7dec92acce32398f571959c7a33534f0c4.zip |
gpgsm: New option --no-pretty-dn
* sm/gpgsm.c (oNoPrettyDN): New.
(opts): Add --no-pretty-dn.
(main): Implement.
* sm/gpgsm.h (opt): Add no_pretty_dn.
* sm/certdump.c (gpgsm_es_print_name): Act upon.
Diffstat (limited to 'sm/certdump.c')
-rw-r--r-- | sm/certdump.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sm/certdump.c b/sm/certdump.c index 3ad0edbe3..03bfd4106 100644 --- a/sm/certdump.c +++ b/sm/certdump.c @@ -728,7 +728,14 @@ gpgsm_es_print_name2 (estream_t fp, const char *name, int translate) void gpgsm_es_print_name (estream_t fp, const char *name) { - gpgsm_es_print_name2 (fp, name, 1); + if (opt.no_pretty_dn) + { + if (!name) + name = "[error]"; + es_write_sanitized (fp, name, strlen (name), NULL, NULL); + } + else + gpgsm_es_print_name2 (fp, name, 1); } |