diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-29 20:16:39 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-31 19:17:18 +0300 |
commit | 9f75889f9cd3c009bce7699cc0b4c2d53aad1131 (patch) | |
tree | b61e7c149e993076602a13e9633bea7a96e33526 | |
parent | 3d18446acef5462e946fe79909b198b35c2bbfa0 (diff) |
Remove redundant comma escaping in certificate authentication prompt
-rw-r--r-- | bpkg/auth.cxx | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx index 591c6a5..c2a84dc 100644 --- a/bpkg/auth.cxx +++ b/bpkg/auth.cxx @@ -233,7 +233,36 @@ namespace bpkg "-subject", "-dates", "-email", - "-nameopt", "RFC2253,sep_multiline" + + // Previously we have used "RFC2253,sep_multiline" format to display + // the requested fields, but that resulted in some undesirable + // behavior like escaping commas (\,) while dispaying only one field + // per line. The reason for that is RFC2253 specifier which get + // expanded into: + // + // esc_2253,esc_ctrl,esc_msb,utf8,dump_nostr,dump_unknown,dump_der, + // sep_comma_plus,dn_rev,sname. + // + // Now we filtered them and leave just those specifiers that we + // really need: + // + // utf8 - use UTF8 encoding for strings; + // + // esc_ctrl - display control characters in \XX notation (we + // don't expect them in properly created + // certificates, but it's better to print this way if + // they appear); + // + // sname - use short form for field names (like + // "O=Code Synthesis" vs + // "organizationName=Code Synthesis"); + // + // dump_nostr - do not print any binary data in the binary form; + // dump_der + // + // sep_multiline - display field per line. + // + "-nameopt", "utf8,esc_ctrl,dump_nostr,dump_der,sname,sep_multiline" }, true, true)); |