Skip to content

Commit

Permalink
Refactoring test_certs_r4.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ounsworth committed Nov 2, 2024
1 parent 7c3c798 commit 2487bd4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 102 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/artifact_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Test artifacts with OQS
run: ./src/test_certs_r4_with_oqs.sh
run: ./src/test_certs_r4 oqs
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Test artifacts with BC
run: ./src/test_certs_r4_with_bc.sh
run: ./src/test_certs_r4 bc
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions src/bc.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
verify_r3.sh $(pwd)/$tafile 2>&1
1 change: 1 addition & 0 deletions src/oqs.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openssl verify -check_ss_sig -verbose -CAfile $tafile $tafile 2>&1
16 changes: 14 additions & 2 deletions src/test_certs_r4_with_oqs.sh → src/test_certs_r4.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
#!/bin/sh

if [ $# -lt 1 ]; then
echo "Error: must provide the name of the verifier to use, which must match a .cmd file in the /src dir."
exit -1
fi

verifier=%1
verifierCmd=$(<$verifier.cmd)

echo "DEBUG: verifiedCmd: $verifierCmd"



certsdir_r4="artifacts_certs_r4"
certszip_r4="artifacts_certs_r4.zip"
cmszipr1="artifacts_cms_v1.zip"
inputdir="./providers"
outputdir="./output/certs"
logfile=$outputdir/oqs_certs.log
logfile=$outputdir/$verifier_certs.log

# Start the results CSV file
mkdir -p $outputdir
Expand Down Expand Up @@ -46,7 +58,7 @@ test_ta () {
printf "\nTesting %s\n" $tafile >> $logfile

# The actual openssl command that is the heart of this script
ossl_output=$(openssl verify -check_ss_sig -verbose -CAfile $tafile $tafile 2>&1)
ossl_output=$(eval $verifierCmd)
ossl_status=$?

# log it to file and to stdout
Expand Down
98 changes: 0 additions & 98 deletions src/test_certs_r4_with_bc.sh

This file was deleted.

0 comments on commit 2487bd4

Please sign in to comment.