jetforce/generate_ssl_cert

10 lines
239 B
Plaintext
Raw Normal View History

2019-08-04 19:52:54 +02:00
#!/usr/bin/env bash
domain=${1:-localhost}
echo "Generating ad-hoc SSL certificate for domain '${domain}'"
openssl req \
-newkey rsa:2048 -nodes -keyout ${domain}.key \
-nodes -x509 -out ${domain}.crt \
-subj "/CN=${domain}"