-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require UTF8 encoding in GetX509NameInfo #59116
Conversation
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsThis changes We assume the BIO is going to contain UTF8 here: Line 723 in 6d094a0
Test result, before the fix:
Closes #59105
|
@danmoseley Would you be supportive of taking this as a 6.0 candidate?
|
Might. Can you share SO link? How long has this bug been present without previous reports? Let's get this merged meantime |
.NET Core 1.0 preview 8, or thereabouts 😄. |
Failure:
Seems like #58927 and is unrelated from the PR. |
I don't think the macOS libraries tests ran, either. |
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. |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1238458928 |
This changes
GetX509NameInfo
to 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