Skip to content

Commit

Permalink
Fix test for request conflict with SSNv2
Browse files Browse the repository at this point in the history
The test for request conflict with SSNv2 has been updated to
create a duplicate request with the proper requestId attribute.
With this change the CLI is no longer failing, but it still
does not create a new request as expected.
  • Loading branch information
edewata committed Nov 7, 2024
1 parent 847ddbc commit f1c72bc
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/ca-ssnv2-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,8 @@ jobs:
# should be created with a new ID, leaving the conflicting request intact,
# and a new cert should be issued as usual.
#
# However, currently there is no new request created, the conflicting
# request is changed to pending, and the CLI is failing.
# However, currently the CA reuses the conflicting request so there is no
# new request created.

- name: Create a request with the next ID
if: always()
Expand All @@ -1283,7 +1283,7 @@ jobs:
sed -i \
-e "s/^dn: cn=37,/dn: cn=38,/" \
-e "s/^serialno: 0237/serialno: 0238/" \
-e "s/^requestId: 0237/requestId: 0238/" \
-e "s/^cn: 37/cn: 38/" \
request.ldif
Expand All @@ -1297,20 +1297,13 @@ jobs:
- name: Enroll a cert with a conflicting request ID
if: always()
run: |
# the CLI should complete successfully
docker exec pki pki \
-n caadmin \
ca-cert-issue \
--profile caUserCert \
--csr-file testuser.csr \
--output-file testuser.crt \
> >(tee stdout) 2> >(tee stderr >&2) || true
# the CLI should complete successfully, but currently it's failing
cat > expected << EOF
ERROR: Request pending
EOF
diff expected stderr
--output-file testuser.crt
- name: Check requests
if: always()
Expand Down

0 comments on commit f1c72bc

Please sign in to comment.