-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Create copies of mutable properties on X509Certificate2 #38884
Conversation
Export(Cert) returned the original byte array from the PAL. If a caller mutated the result of the export, they would be mutating the underlying representation of RawData in the PAL. To be consistent with Windows and Linux, we return a copy in the PAL.
src/libraries/System.Security.Cryptography.X509Certificates/tests/CertTests.cs
Outdated
Show resolved
Hide resolved
Not sure what happened to the build, seems wedged? Should probably try (Libraries Test Build Windows_NT x64 Debug) again. |
Sadly, close/reopen only reran the already completed legs. You can probably do it easier than I can... git fetch --all
git merge dotnet/master
git push origin HEAD What's that? New commit? Let's rerun all the jobs. |
Yeah I was just hoping to avoid running the other 99 checks again and whatever carbon footprint comes along with it. Since y'all squash merge I just threw on an empty commit. |
Praiseworthy 😄. If there's an abort button somewhere in AzDO, I haven't been able to find it or can't find it because I'm not empowered to use it. Probably PEBKAC/RTFM, but is what it is 🤷. |
Seems like AzDO had a bad day today. I'll try again tomorrow. |
macOS failure is #38998. WASM failure was |
Export(X509ContentType.Cert)
on macOS was returning the byte array from a field in the PAL, which allowed callers to mutate the underlying certificate.IssuerName
andSubjectName
return mutable data onRawData
, so theget
there returns a copy.Fixes #38864.