11 lines
434 B
Bash
11 lines
434 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
cd $(dirname $0)
|
||
|
|
||
|
rf -rf localhost.*
|
||
|
|
||
|
openssl req -new -nodes -newkey rsa:2048 -keyout localhost.key -out localhost.csr -subj "/C=US/ST=YourState/L=YourCity/O=Example-Certificates/CN=localhost.local"
|
||
|
openssl x509 -req -sha256 -days 1024 -in localhost.csr -CA RootCA.pem -CAkey RootCA.key -CAcreateserial -extfile domains.ext -out localhost.crt
|
||
|
|
||
|
cat localhost.crt RootCA.crt > fullchain.pem
|
||
|
cat localhost.key > privkey.pem
|