newdomain.sh
· 259 B · Bash
Raw
#!/bin/bash
openssl rsa -in account.key -pubout 2>&1 | grep -v "writing"
echo "press enter..." >&2
read enter
openssl req -new -sha256 -key domain.key -subj "/" \
-reqexts SAN -config <(cat /etc/ssl/openssl.cnf \
<(printf "[SAN]\nsubjectAltName=DNS:$1"))
| 1 | #!/bin/bash |
| 2 | openssl rsa -in account.key -pubout 2>&1 | grep -v "writing" |
| 3 | echo "press enter..." >&2 |
| 4 | read enter |
| 5 | openssl req -new -sha256 -key domain.key -subj "/" \ |
| 6 | -reqexts SAN -config <(cat /etc/ssl/openssl.cnf \ |
| 7 | <(printf "[SAN]\nsubjectAltName=DNS:$1")) |
| 8 |