Skip to content

Commit

Permalink
device_provisioning: sign_config.sh: More generic "source" with "."
Browse files Browse the repository at this point in the history
Since the sign_config.sh script may also be invoked by sh instead of
bash, it is necessary to use "." to source files.

Signed-off-by: Michael Weiß <[email protected]>
  • Loading branch information
quitschbo committed Aug 11, 2023
1 parent 3ed585a commit 09e9386
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ sig=${cfg%.conf}.sig
# create signature
if [ -z $4 ]
then
source ${SELF_DIR}/../../test_passwd_env.bash
. ${SELF_DIR}/../../test_passwd_env.bash
PASS_IN_CA="-passin env:TRUSTME_TEST_PASSWD_PKI"

openssl dgst -sha512 -sign "$key" -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:-1 -out "$sig" ${PASS_IN_CA} "$cfg"
else
openssl dgst -sha512 -sign "$key" -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:-1 -out "$sig" -passin "pass:$4" "$cfg"
Expand Down

0 comments on commit 09e9386

Please sign in to comment.