-
Notifications
You must be signed in to change notification settings - Fork 10.7k
macOS dev-certs overhaul #42251
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
Merged
adityamandaleeka
merged 22 commits into
dotnet:main
from
adityamandaleeka:macos_devcerts_updates
Jul 26, 2022
Merged
macOS dev-certs overhaul #42251
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b852683
macOS dev-certs changes
adityamandaleeka d7f6b51
Remove unnecessary trust checks for deletion.
adityamandaleeka 2f6d1f2
Add specific return message for existing cert trusted.
adityamandaleeka 765e1a7
Clean up unnecessary code.
adityamandaleeka 22dd412
Throw on keychain add failure.
adityamandaleeka a9a1808
Fix handling of create+trust workflow.
adityamandaleeka df248a9
Feedback.
adityamandaleeka dc5e8cf
Add warning about changing exit codes.
adityamandaleeka 0ff62c4
Handle torn state cases.
adityamandaleeka 77b079c
Make --check also check for consistent state.
adityamandaleeka 7a835ad
Rev certificate version.
adityamandaleeka 6929323
Revert the changes around handling the old cert model.
adityamandaleeka b5f447e
Update OID for dev cert.
adityamandaleeka d511850
Make OID change on macOS only.
adityamandaleeka 42e9f11
Revert version change that's no longer needed.
adityamandaleeka a96c046
Show warning on https, trust, and check commands.
adityamandaleeka 5c54334
Add aka.ms link to explainer doc for cert change.
adityamandaleeka 58cdbae
Oops.
adityamandaleeka 14a0f26
Feedback.
adityamandaleeka 5048398
Fix KestrelConfigurationLoaderTests to use new dev cert on macOS.
adityamandaleeka 0346d22
Bring back 6.0 compat, prompt on https when updating state.
adityamandaleeka 983aee6
Remove OID change warning.
adityamandaleeka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid adding new results here? This is a contract between us and the tooling teams, so adding new results changes that contract and might break them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javiercn Ah, I see, good to know. I'll check out how the tooling stuff consumes this today.
I'll also add a note mentioning this contract next to the enum declaration so someone doesn't accidentally break the contract in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... can you point me to where this is used by tooling? I can't seem to find it.
cc @vijayrkn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am assuming you are referring to this: https://devdiv.visualstudio.com/DevDiv/_git/WebTools?path=/src/ProjectSystem/Web/CommonServices/AspNetCoreDeveloperCertificatesTool.cs&_a=contents&version=GBmain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vijayrkn! Looks like the tooling just calls the dev-certs tool and relies on some of the status codes here which are the exit codes of the tool:
aspnetcore/src/Tools/dotnet-dev-certs/src/Program.cs
Lines 19 to 26 in 36e1456
The
EnsureCertificateResultenum changes I made won't change the actual exit codes from the tool, since these turn into "Success" here:https://github.com/dotnet/aspnetcore/pull/42251/files#diff-1454ec4889b7f660676a246d1b0f74f29b980e4370e1932e012e2b968d33702aR433
So I think we're safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding @BillHiebert in case there are other places where we call into the tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a note of caution about modifying the exit codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also impacts VS 4 Mac and Docker container tools. FYI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now that this only affects the internal reporting, but that the tool still returns 0 (success) so I think we are good here.