Skip to content

Commit

Permalink
[MTM-59554] allow to export only device certificate optionally
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanc8y committed Jun 13, 2024
1 parent 160de8c commit 4bbd45f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mqtt-client/scripts/02moveCertificatesToKeystore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ set -x
NAME=iot-device-0001
FILES_WITH_CERTIFICATES="$NAME-cert.pem iot-cert.pem"

# Check for the --leafonly option
if [[ "$1" == "--leafonly" ]]; then
FILES_WITH_CERTIFICATES="$NAME-cert.pem"
fi

rm chain-$NAME.pem chain-with-private-key-$NAME.p12 chain-with-private-key-$NAME.jks || echo "Nothing to remove"

cat $FILES_WITH_CERTIFICATES > chain-$NAME.pem
Expand Down

0 comments on commit 4bbd45f

Please sign in to comment.