Updating `dotnet dev-certs https` to better support expanded scenarios
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
It would be helpful to be able to retrieve and generate dev certs programmatically.
Currently, we have to use some hacky way to retrieve it programmatically (see https://github.com/dotnet/aspire-samples/pull/667/files).
Another limitation of the current situation is that since the cert is only valid for `localhost`, so if an app is running in a container and needs to access another service on the host, there will be an SSL error since requests will be done against `https://host.docker.internal`. Same issue with other container services running with short names, like `https://catalog` for example.
### Describe the solution you'd like
- A public interface to interact with the dev cert (at least get the current one)
- Ideally a way to add alternative subject name to support the container case.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.