Commit Graph

15 Commits

Author SHA1 Message Date
Javier Calvarro Nelson 0c5c1771ef
[Https] Export the certificate in PEM format too (#23803)
* Changed `--key-format` to `--format`.
* Changed the format of the certificate to PEM when `--format pem` is indicated.
2020-07-09 10:04:12 -07:00
Javier Calvarro Nelson 156023d3f9
[HTTPS] Support exporting the dev-cert in PEM format and support importing an existing dev-cert in PFX (#23567)
* Support exporting the certificate key into PEM format
* Support importing an existing https dev certificate into the certificate store
2020-07-07 08:26:08 -07:00
Javier Calvarro Nelson cdfa43bbe0
Avoid trying to fix the trusted root certificates (#21599) 2020-05-07 18:41:52 -07:00
Javier Calvarro Nelson 8e1e81ae78
[HTTPS] Update certificate strategy for Mac OS (#20022)
* 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.
2020-04-16 13:52:10 -07:00
Stephen Halter 88073f86ff Merge branch 'release/3.1' into master 2020-02-18 13:46:51 -08:00
dotnet-maestro-bot 2dc908d502 [automated] Merge branch 'release/2.1' => 'release/3.1' (#18396)
* [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>
2020-01-17 08:30:12 -08:00
Javier Calvarro Nelson 8e5767bdf1 [Platform] Detect and fix certificates with potentially inaccessible keys on Mac OS (3.1) (#17581)
* [Platform] Add logic to dotnet-dev-certs to detect and fix certificates with inaccessible keys on Mac OS

* Update the docs link
2020-01-16 10:29:37 -08:00
Kahbazi b56f84131a Use Count instead of Any() on List (#18022) 2020-01-02 07:55:29 -08:00
Javier Calvarro Nelson 3ceca46c5b
[Platform] Provide a better error message when the developer certificate can't be used (#16659)
Improves the error message Kestrel gives when the developer certificate key is not available for some reason.
2019-10-31 21:50:26 +01:00
Justin Kotalik fdba8a91f9
Add versioning to dotnet-dev-certs (#10908) 2019-06-05 22:04:27 -07:00
Javier Calvarro Nelson f934bfaa7e
[Https][Tooling] Add digital signature to the KeyUsage of the HTTPS dev-cert (#9293)
* [Https][Tooling] Add digital signature to the KeyUsage of the HTTPS dev-cert
2019-04-12 09:27:54 +02:00
Doug Bunting e717a8443e
Update last few projects to target `netcoreapp3.0` (#5128)
- #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
2018-12-17 12:30:28 -08:00
Nate McMaster 02780bac26
Merge branch 'release/2.2' 2018-12-14 16:03:16 -08:00
Nate McMaster feb641ddda
Merge branch 'release/2.1' into release/2.2 2018-12-14 09:44:15 -08:00
Nate McMaster 13ae0057fb
Replace .Sources package references with local code (#4801)
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
2018-12-14 08:36:36 -08:00