diff --git a/basic_configs/ssl/gen.fish b/basic_configs/ssl/gen.fish new file mode 100755 index 0000000..10b0847 --- /dev/null +++ b/basic_configs/ssl/gen.fish @@ -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 diff --git a/basic_configs/ssl/local_cert.cnf b/basic_configs/ssl/local_cert.cnf new file mode 100644 index 0000000..359ec0d --- /dev/null +++ b/basic_configs/ssl/local_cert.cnf @@ -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