Skip to content

Commit

Permalink
fix typos, use legacy provider with openssl for pkcs12
Browse files Browse the repository at this point in the history
  • Loading branch information
rambo committed Nov 4, 2023
1 parent af3043e commit d50300c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/firstrun.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S /bin/bash
if [ -f /opt/tak/data/firstrun.done ]
then
echo "First run already cone"
echo "First run already done"
exit 0
fi

Expand Down
11 changes: 9 additions & 2 deletions scripts/firstrun_rm.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S /bin/bash
if [ -f /opt/tak/data/firstrun.done ]
then
echo "First run already cone"
echo "First run already done"
exit 0
fi

Expand Down Expand Up @@ -43,8 +43,15 @@ TAK_SERVER_HOSTNAME="$(cat /pvarki/kraftwerk-init.json | jq -r .product.dns)"
mkdir -p /opt/tak/data/certs/files
pushd /opt/tak/data/certs/files >> /dev/null

openssl list -providers 2>&1 | grep "\(invalid command\|unknown option\)" >/dev/null
if [ $? -ne 0 ] ; then
echo "Using legacy provider"
LEGACY_PROVIDER="-legacy"
fi


# Create takserver.p12 using certificates from RM
openssl pkcs12 -export -out takserver.p12 \
openssl pkcs12 ${LEGACY_PROVIDER} -export -out takserver.p12 \
-inkey "${TAK_SERVER_KEY_FILENAME}" \
-in "${TAK_SERVER_CERT_FILENAME}" \
-name "${TAK_SERVER_HOSTNAME}" \
Expand Down

0 comments on commit d50300c

Please sign in to comment.