validatedocument
Use the SignClient validatedocument command to request a document to be validated:
validatedocument <-workername WORKERNAME | -workerid WORKERID> [options]Command Options
Option | Description |
|---|---|
| Access token to use for JWT authentication. Can only be used with HTTP protocol. Cannot be specified at the same time as |
| Data to send to the Worker. |
| Server name or IP address. Default: |
| File from where data is read to send to the Worker. |
| Alias of the key in the keystore to use for authentication. |
| Keystore with private key and certificate for client certificate authentication. |
| Password for reading the keystore. If |
| Additional metadata to send to the Signer. The parameters should be given in the format |
| Password for authentication. If |
| Server port. Default: |
| Method of interacting with SignServer: |
| URL to the webservice servlet. Default: |
| Keystore with trusted certificates to use with HTTPS. |
| Password for the keystore with trusted certificates. If |
| Username for authentication. |
| ID of Worker performing the operation. |
| Name of Worker performing the operation. |
Example Use Cases
Validate a Signed XML
You can validate a signed XML document passed directly as a string on the command line. Uses the default WEBSERVICES protocol. Practical for quick tests or small inline payloads.
validatedocument -workername XMLValidator -data "<root><Signature..."You can also validate a signed XML file by providing its path:
validatedocument -workername XMLValidator -infile /tmp/signed.xmlValidate with the Truststore
Connects over HTTPS and validates the server certificate using a truststore. The worker is identified by ID rather than name.
validatedocument -workerid 2 -infile /tmp/signed.xml -truststore truststore.jks -truststorepwd changeitValidate with HTTP Protocol
Explicitly uses the HTTP protocol instead of the default WEBSERVICES. Useful in environments where the web services endpoint is unavailable or undesirable.
validatedocument -workername XMLValidator -protocol HTTP -infile /tmp/signed.xmlValidate with Additional Metadata
Passes additional key-value metadata to the validator alongside the document. Used when the Worker is configured to accept or require extra input parameters.
validatedocument -workername XMLValidator -infile /tmp/signed.xml -metadata param1=value1 -metadata param2=value2Validate with Servlet URL Path
Targets a Worker directly through its servlet URL path using the HTTP protocol, rather than specifying -workername or -workerid. Useful in non-standard deployments or when constructing URLs programmatically.
validatedocument -data "<root><Signature..." -servlet /signserver/worker/XMLValidator -protocol HTTP