Generate local certs for LAN https access

This commit is contained in:
Muaz Ahmad 2024-05-08 16:33:43 +05:00
parent b15ccc95b8
commit dae913317e
2 changed files with 29 additions and 0 deletions

9
basic_configs/ssl/gen.fish Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/fish
openssl genrsa -out key.pem 2048
openssl req -new -out server.csr -key key.pem -config local_cert.cnf
openssl x509 -req -days 9999 -in server.csr -signkey key.pem -out cert.pem -extensions v3_req -extfile local_cert.cnf
rm server.csr

View file

@ -0,0 +1,20 @@
[ req ]
default_bits = 2048
prompt = no
distinguished_name = req_distinguished_name
req_extensions = v3_req
[req_distinguished_name]
countryName = PK
stateOrProvinceName = Sindh
localityName = Karachi
commonName = 272254864.xyz
[v3_req]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = *.272254864.xyz