Skip to content

Commit

Permalink
Hold off on starting boulder until setup wizzard is completed
Browse files Browse the repository at this point in the history
  • Loading branch information
hakwerk committed Feb 28, 2021
1 parent 5e9cbef commit 033f3ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion entrypoint.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ diff --git a/test/entrypoint.sh b/test/entrypoint.sh
index 5ca9929..f18e1d8 100755
--- a/test/entrypoint.sh
+++ b/test/entrypoint.sh
@@ -36,6 +36,12 @@ wait_tcp_port boulder-mysql 3306
@@ -36,6 +36,18 @@ wait_tcp_port boulder-mysql 3306
# create the database
MYSQL_CONTAINER=1 $DIR/create_db.sh

+fl=$(pwd)/labca/setup_complete
+while [ ! -f $fl ]; do
+ echo "Waiting for $fl to appear..."
+ sleep 30
+done
+
+#softhsm2-util --show-slots
+softhsm2-util --init-token --slot 0 --label "intermediate signing key (rsa)" --pin 1234 --so-pin 5678 | /bin/true
+[ -e labca/test-ca.p8 ] && softhsm2-util --import labca/test-ca.p8 --id 333333 --force --token "intermediate signing key (rsa)" --pin 1234 --so-pin 5678 --label 'intermediate_key'
Expand Down
2 changes: 2 additions & 0 deletions gui/apply-boulder
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,5 @@ openssl rsa -in $PKI_ROOT_CERT_BASE.key -pubout > test-root.pubkey.pem 2>/dev/nu
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in test-root.key -out test-root.p8

chown -R `ls -l PKI.md | cut -d" " -f 3,4 | sed 's/ /:/g'` .

[ -f setup_complete ] || touch setup_complete

0 comments on commit 033f3ae

Please sign in to comment.