Output unescaped utf8 x509 issuer/subject DNs#18171
Output unescaped utf8 x509 issuer/subject DNs#18171unRob wants to merge 3 commits intocurl:masterfrom
Conversation
|
Analysis of PR #18171 at 37e33872: Test 3207 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 12 different CI jobs (the link just goes to one of them). Generated by Testclutch |
|
It could perhaps just be noted that this requires that you also use UTF-8 in the terminal which is not universally true. Presumably people can also encode other things in there that will not render correctly, but I'm still willing to try this route. |
|
@icing any thoughts on this before I merge? |
icing
left a comment
There was a problem hiding this comment.
Without any general strategy on how to output non-ascii characters in a non-utf8 terminal (or to a file), going with utf-8 by default looks like the best strategy to me.
The current state of producing weird question marks is definitely worse, imo.
simplify Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com>
|
Thanks! |
What I'm trying to fix: I have certificates where the issuer DN has accented characters (encoded as utf8 strings) and I'd like
curl -vto render these characters properly, instead of showing�.How I went about it: tweaked the flags 1 passed to
X509_NAME_print_ex2, keeping the current format (delimit key and value with equal sign, delimit entries with semicolon and a space).Example:
This is my first contribution, and while I've read the style guide and contributing guidelines, i'd be happy to keep working on this if i missed something and it needs more work.
Footnotes
https://docs.openssl.org/3.1/man3/ASN1_STRING_print_ex/#notes ↩
https://docs.openssl.org/3.1/man3/X509_NAME_print_ex ↩