Skip to content

Commit

Permalink
Making the python tolerant of multiple submissions of the same alg
Browse files Browse the repository at this point in the history
  • Loading branch information
ounsworth committed Jul 22, 2024
1 parent c19ab91 commit 005310d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/test_certs_r3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ test_ta () {


tafileBasename=$(basename $tafile)
oid=${tafileBasename%_ta.pem} # remove the suffix "_ta.pem"

# strip off the file suffix to get the OID name
if [[ $(expr match "$tafileBasename" ".*_ta.pem") != 0 ]]; then
oid=${tafileBasename%_ta.pem}
elif [[ $(expr match "$tafileBasename" ".*_ta.der") != 0 ]]; then
oid=${tafileBasename%_ta.der}
elif [[ $(expr match "$tafileBasename" ".*_ta.der.pem") != 0 ]]; then
oid=${tafileBasename%_ta.der.pem}
else # It's some other filename
printf "ERROR: file name is not in the expected format: %s\n" $tafileBasename
return

# some artifacts submit multiple copies of the same cert as .pem, .der, etc. Just skip the second one
if [[ $(expr match "$alreadyTestedOIDs" ".*$oid.*") != 0 ]]; then
Expand Down

0 comments on commit 005310d

Please sign in to comment.