Update enforcing-ssl.md (#18626)

* Update enforcing-ssl.md

* Update enforcing-ssl.md
pull/18627/head
Rick Anderson 2020-06-01 18:35:32 -10:00 committed by GitHub
parent 663c9ebbc3
commit ea521d0138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -354,9 +354,17 @@ See [this GitHub issue](https://github.com/dotnet/AspNetCore.Docs/issues/6199).
The Windows Subsystem for Linux (WSL) generates an HTTPS self-signed cert. To configure the Windows certificate store to trust the WSL certificate:
* Run the following command to export the WSL-generated certificate:
`dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p <cryptic-password>`
```
dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p <cryptic-password>
```
* In a WSL window, run the following command:
`ASPNETCORE_Kestrel__Certificates__Default__Password="<cryptic-password>" ASPNETCORE_Kestrel__Certificates__Default__Path=/mnt/c/Users/user-name/.aspnet/https/aspnetapp.pfx dotnet watch run`
```
ASPNETCORE_Kestrel__Certificates__Default__Password="<cryptic-password>"
ASPNETCORE_Kestrel__Certificates__Default__Path=/mnt/c/Users/user-name/.aspnet/https/aspnetapp.pfx
dotnet watch run
```
The preceding command sets the environment variables so Linux uses the Windows trusted certificate.