* Fixes and improvements for dotnet-dev-certs:
* Revamps the HTTPS developer certificate tool implementation.
* It accumulated a lot of cruft during the past few years and that has made making changes harder.
* Separated the CertificateManager implementation into different classes per platform.
* This centralizes the decision point of choosing a platform in a single place.
* Makes clear what the flow is for a given platform.
* Isolates changes needed for a given platform in the future.
* Moved CertificateManager to a singleton
* No more statics!
* Updates logging to use EventSource
* We didn't have a good way of performing logging as the code is shared and must run in multiple contexts and the set of dependencies need to be kept to a minimum.
* Adding ETW allow us to log/monitor the the tool execution and capture the logs with `dotnet trace` without having to invent our own logging.
* We can decide to write an EventListener in `dotnet-dev-certs` to write the results to the console output.
* Updates the way we handle the dev-cert in Mac OS to use the security tool to import the certificate into the store instead of using the certificate store.
* [Platform] Detect and fix certificates with potentially inaccessible keys on Mac OS (2.1) (#17560)
* [Https] Detects and fixes HTTPS certificates where the key is not guaranteed to be accessible across security partitions
* Fix dotnet dev-certs https --check
* Update logic for detecting missing certs
* Fix security command
* Update warning logic
* Check that the key is accessible in Kestrel
* Add correct link to docs
* Update src/Tools/dotnet-dev-certs/src/Program.cs
Co-Authored-By: Daniel Roth <daroth@microsoft.com>
* Update src/Tools/dotnet-dev-certs/src/Program.cs
Co-Authored-By: Daniel Roth <daroth@microsoft.com>
* Add test for 2.1
* Update src/Tools/dotnet-dev-certs/src/Program.cs
Co-Authored-By: Chris Ross <Tratcher@Outlook.com>
* Address feedback
* Fix non-interctive path
* Fix tests
* Remove a couple of test from an unshipped product
* Check only for certificates considered valid
* Switch the exception being caught, remove invalid test
Co-authored-by: Daniel Roth <daroth@microsoft.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Fix patchconfig merge (#18389)
* Fix flaky HubConnectionHandler test (#18391)
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: Daniel Roth <daroth@microsoft.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Brennan <brecon@microsoft.com>
- #3754
- remove `#if`'s for multi-targeting where source is never multi-targeted
- left `StreamPipeReader`, `StreamPipeWriter` and their test classes alone because they're moving to CoreFx
Replaces package references the following packages with local code:
Microsoft.AspNetCore.Certificates.Generation.Sources
Microsoft.Extensions.CopyOnWriteDictionary.Sources
Microsoft.Extensions.ClosedGenericMatcher.Sources
Microsoft.Extensions.ObjectMethodExecutor.Sources
Microsoft.Extensions.PropertyActivator.Sources
Microsoft.Extensions.PropertyHelper.Sources
Microsoft.Extensions.RazorViews.Sources
Microsoft.Extensions.SecurityHelper.Sources
Microsoft.Extensions.StackTrace.Sources
Microsoft.Extensions.WebEncoders.Sources