Skip to content
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

Merged
merged 6 commits into from
Jul 10, 2020

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Jul 7, 2020

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 and SubjectName return mutable data on RawData, so the get there returns a copy.

Fixes #38864.

vcsjones added 2 commits July 7, 2020 13:29
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.
@ghost
Copy link

ghost commented Jul 7, 2020

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq
Notify danmosemsft if you want to be subscribed.

@vcsjones
Copy link
Member Author

vcsjones commented Jul 8, 2020

Not sure what happened to the build, seems wedged? Should probably try (Libraries Test Build Windows_NT x64 Debug) again.

@bartonjs bartonjs closed this Jul 8, 2020
@bartonjs bartonjs reopened this Jul 8, 2020
@bartonjs
Copy link
Member

bartonjs commented Jul 8, 2020

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.

@vcsjones
Copy link
Member Author

vcsjones commented Jul 8, 2020

You can probably do it easier than I can

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.

@bartonjs
Copy link
Member

bartonjs commented Jul 8, 2020

Yeah I was just hoping to avoid running the other 99 checks again and whatever carbon footprint comes along with it.

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 🤷.

@vcsjones
Copy link
Member Author

vcsjones commented Jul 8, 2020

Seems like AzDO had a bad day today. I'll try again tomorrow.

@safern safern mentioned this pull request Jul 8, 2020
@vcsjones
Copy link
Member Author

vcsjones commented Jul 9, 2020

macOS failure is #38998. WASM failure was System.Linq.Parallel.Tests.ToLookupTests.ToLookup_AggregateException, I'd put money on that not being related to this PR.

@bartonjs bartonjs merged commit eda20d0 into dotnet:master Jul 10, 2020
@vcsjones vcsjones deleted the fix-38864 branch July 10, 2020 15:29
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export certificate fails under some circumstances
3 participants