Skip to content

Commit e18c6c2

Browse files
committed
Update README.md
1 parent 928db7d commit e18c6c2

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,22 @@ dotnet --list-sdks
149149

150150
### Certificates
151151

152-
To trust the certificate
152+
To trust the certificate on windows / mac
153153

154154
```PowerShell
155155
dotnet dev-certs https --trust
156156
```
157157

158+
To generate a cert in linux :
159+
160+
```sh
161+
#!/bin/bash
162+
openssl req -x509 -newkey rsa:4096 -keyout /app/key.pem -out /app/cert.pem -days 365 -nodes -subj "/CN=localhost"
163+
openssl pkcs12 -export -out /app/cert.pfx -inkey /app/key.pem -in /app/cert.pem -passout pass:mypassword
164+
export ASPNETCORE_Kestrel__Certificates__Default__Path=/app/cert.pfx
165+
export ASPNETCORE_Kestrel__Certificates__Default__Password=mypassword
166+
```
167+
158168
### Dependancies
159169

160170
dependancies have to be dowloaded from [standard sources](https://go.microsoft.com/fwlink/?linkid=848054)

0 commit comments

Comments
 (0)