The section Trust HTTPS certificate from Windows Subsystem for Linux seems a bit sketchy
[Enter feedback here]
First of all,
"Run the following command to export the WSL-generated certificate: dotnet dev-certs https -ep %USERPROFILE%.aspnet\https\aspnetapp.pfx -p
Does this mean to run the command in the windows host of the WSL? I assumed it means run at a powershell prompt. When I do run the command I get this error:
"A valid HTTPS certificate is already present."
This is true, there is a cert there already named. "aspnetapp.pfx"
In the second bullet item there seems to be three unexplained commands. The first two which seem to be setting environmental variables need a to be preceeded by "set". Of course, I don't know what the password should be at this point because of the earlier problem.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: c7ddfb2f-5dea-5e31-2a27-02a4dc16104c
- Version Independent ID: 12ca0b9a-2638-a4ce-c45f-d4579c83dafb
- Content: Enforce HTTPS in ASP.NET Core
- Content Source: aspnetcore/security/enforcing-ssl.md
- Product: aspnet-core
- Technology: aspnetcore-security
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande
The problem area is Trust HTTPS certificate from Windows Subsystem for Linux
These questions need to be answered and the code needs to be probably formatted.
@glennsills I fixed the formatting - so it's easier to understand.
Yes, run the 1st command in windows. The cert exists, you're exporting it.