Skip to content

Commit

Permalink
Better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ounsworth committed Aug 29, 2024
1 parent 8bfd863 commit 2d848d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/test_certs_r3_with_bc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ test_ta () {
oid=${tafileBasename%_ta.der.pem}
else # It's some other filename
printf "ERROR: file name is not in the expected format: %s\n" $tafileBasename
printf "ERROR: file name is not in the expected format: %s\n" $tafileBasename >> $logfile
return
fi

# Because invoking the JRE is slow, only test OIDs that will appear in the final table
if [[ $(expr match "$oidsList" ".*\"$oid\".*") != 0 ]]; then
printf "\nSkipping deprecated prototyping OID %s\n" $oid
printf "\nSkipping deprecated prototyping OID %s\n" $oid >> $logfile
return
fi

# 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
printf "\nWarning: %s has been submitted multiple times by this provider. Skipping\n" $oid
printf "\nWarning: %s has been submitted multiple times by this provider. Skipping\n" $oid
printf "\nWarning: %s has been submitted multiple times by this provider. Skipping\n" $oid >> $logfile
return
fi

Expand Down
4 changes: 3 additions & 1 deletion src/test_certs_r3_with_oqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ test_ta () {
oid=${tafileBasename%_ta.der.pem}
else # It's some other filename
printf "ERROR: file name is not in the expected format: %s\n" $tafileBasename
printf "ERROR: file name is not in the expected format: %s\n" $tafileBasename >> $logfile
return
fi

# 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
printf "\nWarning: %s has been submitted multiple times by this provider. Skipping\n" $oid
printf "\nWarning: %s has been submitted multiple times by this provider. Skipping\n" $oid
printf "\nWarning: %s has been submitted multiple times by this provider. Skipping\n" $oid >> $logfile
return
fi

Expand Down

0 comments on commit 2d848d4

Please sign in to comment.