toolshed/frontend/.local/make_localhost.sh

11 lines
434 B
Bash
Raw Normal View History

2024-04-06 18:55:13 +00:00
#!/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