Move to single line of code for creating certs on linux

This commit is contained in:
Daniel Goldberg 2020-02-09 11:37:25 +02:00
parent 8e109c4824
commit f745f45940
2 changed files with 8 additions and 6 deletions

View File

@ -169,9 +169,8 @@ cd "${ISLAND_PATH}" || {
echo "cd failed"
exit 1
}
openssl genrsa -out cc/server.key 2048
openssl req -new -key cc/server.key -out cc/server.csr -subj "/C=GB/ST=London/L=London/O=Global Security/OU=Monkey Department/CN=monkey.com"
openssl x509 -req -days 366 -in cc/server.csr -signkey cc/server.key -out cc/server.crt
"${ISLAND_PATH}"/linux/create_certificate.sh ${ISLAND_PATH}/cc
# Update node
if ! exists npm; then

View File

@ -1,6 +1,9 @@
#!/bin/bash
openssl genrsa -out ./cc/server.key 2048
openssl req -new -key ./cc/server.key -out ./cc/server.csr -subj "/OU=Monkey Department/CN=monkey.com"
openssl x509 -req -days 366 -in ./cc/server.csr -signkey ./cc/server.key -out ./cc/server.crt
server_root=${1:-"./cc"}
openssl genrsa -out $server_root/server.key 2048
openssl req -new -key $server_root/server.key -out $server_root/server.csr -subj "/C=GB/ST=London/L=London/O=Global Security/OU=Monkey Department/CN=monkey.com"
openssl x509 -req -days 366 -in $server_root/server.csr -signkey $server_root/server.key -out $server_root/server.crt