Dotnet Self-Signed Certificate
When building a dotnet project and you need to make HTTPS for your project your quickest option is to generate a self-signed certificate, for that, you can run the following commands:
openssl req -new -x509 -newkey rsa:2048 -keyout localhost.key -out localhost.cer -days 365 -subj /CN=localhost
openssl pkcs12 -export -out localhost.pfx -inkey localhost.key -in localhost.cer
Please keep in mind that you will be prompted for a password.
That’s it, you probably need to configure the application to use HTTPS and look for the PFX file.
Related Articles
Dotnet Host FXR Does Not Exist
How to fix dotnet issue host FXR does not exist
SSL Certificate Private Key Validation
Validating SSL Certificate and Private Key with a simple Python script
Docker ASP.NET Core SSL Certificate Configuration (Linux & Windows Containers)
How to configure HTTPS and mount PFX SSL certificates in Dockerized ASP.NET Core applications on Linux and Windows Server containers.