Skip to content

Commit

Permalink
Ensure deterministic cacert ALIAS name (adoptium#3402)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard authored Jun 24, 2023
1 parent d2dc2f3 commit a6ff29b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/mk-cacerts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ IMPORTED=('null')
alreadyExistsCounter=0 # counter for duplicated file

for FILE in certs/*.crt; do
ALIAS=$(openssl x509 -subject -noout -nameopt compat -in "$FILE" | sed 's/^subject=[[:space:]]*//' | tr '/' ',')
ALIAS=$(openssl x509 -subject -noout -nameopt compat -in "$FILE" | tr '/' ' ' | sed 's/^subject=[[:space:]]*//' | tr -d ',')

if printf '%s\n' "${IMPORTED[@]}" | grep "temurin_${ALIAS}_temurin"; then
echo "Skipping certificate file $FILE with alias: $ALIAS as it already exists"
Expand Down

0 comments on commit a6ff29b

Please sign in to comment.