toolshed/frontend/.local/make_localhost.sh
2024-08-31 01:27:42 +02:00

11 lines
No EOL
434 B
Bash
Executable file

#!/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