Created
December 5, 2021 21:32
-
-
Save teyc/f1032777ab327f100b0f1a911dff787f to your computer and use it in GitHub Desktop.
Self Signed Cert for ASP.net core
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new-selfsignedcertificate | |
https://www.fearofoblivion.com/setting-up-asp-net-dev-certs-for-both-wsl-and-windows | |
[req] | |
prompt = no | |
default_bits = 2048 | |
distinguished_name = subject | |
req_extensions = req_ext | |
x509_extensions = x509_ext | |
[subject] | |
commonName = localhost | |
[req_ext] | |
basicConstraints = critical, CA:true | |
subjectAltName = @alt_names | |
[x509_ext] | |
basicConstraints = critical, CA:true | |
keyUsage = critical, keyCertSign, cRLSign, digitalSignature,keyEncipherment | |
extendedKeyUsage = critical, serverAuth | |
subjectAltName = critical, @alt_names | |
1.3.6.1.4.1.311.84.1.1 = ASN1:UTF8String:ASP.NET Core HTTPS development certificate | |
[alt_names] | |
DNS.1 = localhost | |
DNS.2 = 127.0.0.1 | |
> openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ | |
-keyout localhost.key \ | |
-out localhost.crt \ | |
-config localhost.conf | |
> openssl verify localhost.crt | |
> sudo cp localhost.crt /usr/local/share/ca-certificates | |
> sudo update-ca-certificates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment