Skip to content

Commit

Permalink
Update tests for CA with non-default algorithms
Browse files Browse the repository at this point in the history
The tests for CA with non-default algorithms (i.e. RSA, RSA/PSS,
ECC) have been modified to check the default signing algorithm
params in CS.cfg.
  • Loading branch information
edewata committed Aug 2, 2023
1 parent a972f52 commit 8a8f153
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ca-ecc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withEC"
echo "SHA512withEC" > expected
docker exec pki pki-server ca-config-show ca.signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check CA OCSP signing cert
run: |
# inspect cert with certutil
Expand All @@ -121,6 +126,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withEC"
echo "SHA512withEC" > expected
docker exec pki pki-server ca-config-show ca.ocsp_signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check CA audit signing cert
run: |
# inspect cert with certutil
Expand All @@ -140,6 +150,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withEC"
echo "SHA512withEC" > expected
docker exec pki pki-server ca-config-show ca.audit_signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check subsystem cert
run: |
# inspect cert with certutil
Expand All @@ -159,6 +174,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withEC"
echo "SHA512withEC" > expected
docker exec pki pki-server ca-config-show ca.subsystem.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check SSL server cert
run: |
# inspect cert with certutil
Expand All @@ -178,6 +198,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withEC"
echo "SHA512withEC" > expected
docker exec pki pki-server ca-config-show ca.sslserver.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Run PKI healthcheck
run: docker exec pki pki-healthcheck --failures-only

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/ca-rsa-pss-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withRSA/PSS"
echo "SHA512withRSA/PSS" > expected
docker exec pki pki-server ca-config-show ca.signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check CA OCSP signing cert
run: |
# inspect cert with certutil
Expand All @@ -132,6 +137,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withRSA/PSS"
echo "SHA512withRSA/PSS" > expected
docker exec pki pki-server ca-config-show ca.ocsp_signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check CA audit signing cert
run: |
# inspect cert with certutil
Expand All @@ -151,6 +161,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withRSA/PSS"
echo "SHA512withRSA/PSS" > expected
docker exec pki pki-server ca-config-show ca.audit_signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check subsystem cert
run: |
# inspect cert with certutil
Expand All @@ -170,6 +185,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withRSA/PSS"
echo "SHA512withRSA/PSS" > expected
docker exec pki pki-server ca-config-show ca.subsystem.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check SSL server cert
run: |
# inspect cert with certutil
Expand All @@ -189,6 +209,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA512withRSA/PSS"
echo "SHA512withRSA/PSS" > expected
docker exec pki pki-server ca-config-show ca.sslserver.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Run PKI healthcheck
run: docker exec pki pki-healthcheck --failures-only

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/ca-rsa-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA384withRSA"
echo "SHA384withRSA" > expected
docker exec pki pki-server ca-config-show ca.signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check CA OCSP signing cert
run: |
# inspect cert with certutil
Expand All @@ -131,6 +136,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA384withRSA"
echo "SHA384withRSA" > expected
docker exec pki pki-server ca-config-show ca.ocsp_signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check CA audit signing cert
run: |
# inspect cert with certutil
Expand All @@ -150,6 +160,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA384withRSA"
echo "SHA384withRSA" > expected
docker exec pki pki-server ca-config-show ca.audit_signing.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check subsystem cert
run: |
# inspect cert with certutil
Expand All @@ -169,6 +184,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA384withRSA"
echo "SHA384withRSA" > expected
docker exec pki pki-server ca-config-show ca.subsystem.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Check SSL server cert
run: |
# inspect cert with certutil
Expand All @@ -188,6 +208,11 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
# default signing algorithm should be "SHA384withRSA"
echo "SHA384withRSA" > expected
docker exec pki pki-server ca-config-show ca.sslserver.defaultSigningAlgorithm | tee actual
diff expected actual
- name: Run PKI healthcheck
run: docker exec pki pki-healthcheck --failures-only

Expand Down

0 comments on commit 8a8f153

Please sign in to comment.