-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(startup): undo changes that caused regression in startup script
- Loading branch information
Showing
8 changed files
with
46 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ bin | |
.project | ||
${sys:DATA} | ||
*.log | ||
.certs | ||
|
||
# User-specific stuff: | ||
.idea/workspace.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
#!/bin/sh | ||
|
||
certPath=${1:-"."} # if $1 is not passed, use current directory | ||
set -e | ||
|
||
certPath=${1:-"."} | ||
serverCrt="$certPath/server.crt" | ||
serverKey="$certPath/server.key" | ||
caCrt="$certPath/ca.crt" # Path to the Certificate Authority certificate | ||
caCrt="$certPath/ca.crt" | ||
pkcs12File="$certPath/signaling.p12" | ||
pkcs12Password=${2:-"changeme"} # if $2 is not passed, use "changeme" | ||
pkcs12Password=${2:-"changeme"} | ||
|
||
mkdir -p $certPath | ||
|
||
# Check if server.crt and server.key files exist | ||
if [ ! -f "$serverCrt" ] || [ ! -f "$serverKey" ]; then | ||
echo "server.crt or server.key files not found. Generating certificates..." | ||
. "$(dirname "$0")/generate-certs.sh" $certPath | ||
. "$(dirname "$0")/generate-certs.sh" "$certPath" | ||
fi | ||
|
||
# Check if ca.crt file exists to create a full chain of certificates | ||
if [ -f "$caCrt" ]; then | ||
echo "ca.crt file found. Creating a full chain of certificates..." | ||
cat $serverCrt $caCrt > "$certPath/fullchain.crt" | ||
openssl pkcs12 -export -in "$certPath/fullchain.crt" -inkey $serverKey -name "apiserver" -out $pkcs12File -password pass:$pkcs12Password | ||
else | ||
openssl pkcs12 -export -in $serverCrt -inkey $serverKey -name "apiserver" -out $pkcs12File -password pass:$pkcsPassword | ||
openssl pkcs12 -export -in $serverCrt -inkey $serverKey -name "apiserver" -out $pkcs12File -password pass:$pkcs12Password | ||
fi | ||
|
||
openssl pkcs12 -info -in "$pkcs12File" -noout -passin pass:"$pkcs12Password" # Verifies the keystore | ||
|
||
echo "PKCS12 keystore has been created at $pkcs12File" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
basepath=${1:-"."} # if $1 is not passed, use current directory | ||
|
||
mkdir -p $basepath | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters