Generate tls key files on hpcore new. (#237)

This commit is contained in:
Ravin Perera
2021-02-05 15:36:11 +05:30
committed by GitHub
parent e1b1382599
commit c366e8acfa
4 changed files with 48 additions and 42 deletions

View File

@@ -120,9 +120,6 @@ do
}, null, 2)" > hp.cfg
rm tmp.json
# Generate ssl certs
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout tlskey.pem -out tlscert.pem \
-subj "/C=AU/ST=ST/L=L/O=O/OU=OU/CN=localhost/emailAddress=hpnode${n}@example" > /dev/null 2>&1
popd > /dev/null 2>&1
# Copy the contract files and appbill.

View File

@@ -42,12 +42,6 @@ $basedir/hpfiles/bin/hpcore new $contdir
if [ -f $basedir/hpfiles/ssl/tlscert.pem ]; then
echo "Copying ssl certs to contract directory..."
cp -rf $basedir/hpfiles/ssl/* $contdir/cfg/
else
echo "Generating default ssl certs..."
pushd $contdir/cfg > /dev/null 2>&1
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout tlskey.pem -out tlscert.pem \
-subj "/C=AU/ST=ST/L=L/O=O/OU=OU/CN=localhost/emailAddress=hp@example" > /dev/null 2>&1
popd > /dev/null 2>&1
fi
if [ $mode = "new" ] || [ $mode = "reconfig" ]; then