Skip to content

Commit

Permalink
chore: validate signer of signed pdf file
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Jan 19, 2025
1 parent 5a29ec1 commit fffb4de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/integration/features/file/validate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: validate
And run the command "libresign:install --use-local-cert --java" with result code 0
And run the command "libresign:install --use-local-cert --jsignpdf" with result code 0
And run the command "libresign:install --use-local-cert --pdftk" with result code 0
And run the command "libresign:configure:openssl --cn test" with result code 0
And run the command "libresign:configure:openssl --cn=Common\ Name --c=BR --o=Organization --st=State\ of\ Company --l=City\ Name --ou=Organization\ Unit" with result code 0
And sending "post" to ocs "/apps/provisioning_api/api/v1/config/apps/libresign/identify_methods"
| value | (string)[{"name":"account","enabled":true,"mandatory":true,"signatureMethods":{"clickToSign":{"enabled":true}}}] |
And user "signer1" exists
Expand All @@ -29,3 +29,10 @@ Feature: validate
And as user ""
And sending "get" to ocs "/apps/libresign/api/v1/file/validate/uuid/<FILE_UUID>"
Then the response should have a status code 200
Then the response should be a JSON array with the following mandatory values
| key | value |
| (jq).ocs.data.signers[0].me | false |
| (jq).ocs.data.signers[0].uid | account:signer1 |
| (jq).ocs.data.signers[0].subject | /C=BR/ST=State of Company/L=City Name/O=Organization/OU=Organization Unit/UID=account:signer1/CN=signer1-displayname |
| (jq).ocs.data.signers[0].signature_validation | {"id":1,"label":"Certificate is Trusted."} |
| (jq).ocs.data.signers[0].hash_algorithm | RSA-SHA1 |

0 comments on commit fffb4de

Please sign in to comment.