Uh oh!
There was an error while loading. Please reload this page.
Require UTF8 encoding in GetX509NameInfo - #59116
Conversation
ghost
commented
Sep 14, 2021
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsThis changes We assume the BIO is going to contain UTF8 here: Test result, before the fix: Closes #59105
|
bartonjs
commented
Sep 14, 2021
@danmoseley Would you be supportive of taking this as a 6.0 candidate?
|
danmoseley
commented
Sep 14, 2021
Might. Can you share SO link? How long has this bug been present without previous reports? Let's get this merged meantime |
bartonjs
commented
Sep 14, 2021
.NET Core 1.0 preview 8, or thereabouts 😄. |
vcsjones
commented
Sep 15, 2021
Failure:
Seems like #58927 and is unrelated from the PR. |
vcsjones
commented
Sep 15, 2021
I don't think the macOS libraries tests ran, either. |
danmoseley
commented
Sep 15, 2021
Rerunning failed jobs... thinking about it, this might meet the servicing bar. Let's get a PR up against 6.0 once this goes in. Or preemptively, if you like. |
bartonjs
commented
Sep 15, 2021
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1238458928 |
This changes
GetX509NameInfoto force UTF8 encoding when writing to the BIO withASN1_STRING_print_ex. The OpenSSL function won't return UTF8 unless you ask it to. Otherwise, it returns an escaped string of the contents of the string.We assume the BIO is going to contain UTF8 here:
runtime/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509CertificateReader.cs
Line 723 in 6d094a0
Test result, before the fix:
Closes#59105