Skip to content

Commit d8e3156

Browse files
Ensure deterministic cacert ALIAS name (#3400)
* Ensure deterministic cacert ALIAS name Signed-off-by: Andrew Leonard <[email protected]> * Ensure deterministic cacert ALIAS name Signed-off-by: Andrew Leonard <[email protected]> --------- Signed-off-by: Andrew Leonard <[email protected]>
1 parent bbc1ac6 commit d8e3156

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/mk-cacerts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ IMPORTED=('null')
8383
alreadyExistsCounter=0 # counter for duplicated file
8484

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

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

0 commit comments

Comments
 (0)