Running TimeStampedSignedData

The TimeStampedSignedData sample:

  1. Requests a time stamp for a PKCS #7, CMS, S/MIMEv2, or S/MIMEv3 message

  2. Includes the time stamp in the message.

To run this sample application, execute the following command line in the etjava/examples directory.

java -classpath classes;../lib/enttoolkit.jar;<angus-mail.jar>;<jakarta.activation-api.jar> com.entrust.toolkit.examples.timestamping.TimeStampedSignedData <epf_file> <epf_pwd> <tsa_url> [<tsa_cert>]

Parameter

Value

<jakarta-mail.jar>

The path on your computer of the jakarta.mail-api.jar third-party library downloaded from https://projects.eclipse.org/projects/ee4j.mail

<jakarta.activation-api.jar>

The path on your computer of the jakarta.activation-api.jar third-party library downloaded from https://projects.eclipse.org/projects/ee4j.jaf

<epf_file>

The path of an Entrust user profile in .epf file format.

<epf_pwd>

The password for accessing the Entrust profile.

<tsa_url>

The HTTP URL of a Time-Stamp Authority.

<tsa_cert>

The path of a file containing the Base 64-encoded certificate of the Time-Stamp Authority.

For example:

D:\java\etjava\examples>java -classpath classes;..\lib\enttoolkit.jar;\java\lib
\mail.jar;\java\lib\activation.jar com.entrust.toolkit.examples.timestamping.Tim
eStampedSignedData data\userdata\RsaUser1.epf ~Sample7~ http://vsinterop.entrust
.com:7001/verificationserver/rfc3161timestamp MIIC8DCCAlmgAwIBAgIEOroKBzANBgkqhk
iG9w0BAQUFADAxMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZRW50cnVzdCBYS01TIERlbW8gU2VydmljZT
AeFw0wMTAzMjIxMzQ5NTJaFw0xMTAzMjIxNDE5NTJaMDExCzAJBgNVBAYTAlVTMSIwIAYDVQQKExlFbn
RydXN0IFhLTVMgRGVtbyBTZXJ2aWNlMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfpd0Fb8xE2l
E6MH6na9YPPp2sDQrdmZMVI3gJF+0tDx4mXtt3IM8LrgJ+8dlwCVis5mimAniydiI3UJt8tX43L0N1MR
EP4e4NvCWflW8dkzgrIOK5AhaysPb7oqAlXrDTtBBDlWlckF8a6YfQ17/gsRpQtjEU1d6qYTkWRJgR6w
IDAQABo4IBEzCCAQ8wEQYJYIZIAYb4QgEBBAQDAgAHMFMGA1UdHwRMMEowSKBGoESkQjBAMQswCQYDVQ
QGEwJVUzEiMCAGA1UEChMZRW50cnVzdCBYS01TIERlbW8gU2VydmljZTENMAsGA1UEAxMEQ1JMMTArBg
NVHRAEJDAigA8yMDAxMDMyMjEzNDk1MlqBDzIwMTEwMzIyMTQxOTUyWjALBgNVHQ8EBAMCAQYwHwYDVR
0jBBgwFoAU/3tHOt92l/On5WNH8swBtSYq9gkwHQYDVR0OBBYEFP97Rzrfdpfzp+VjR/LMAbUmKvYJMA
wGA1UdEwQFMAMBAf8wHQYJKoZIhvZ9B0EABBAwDhsIVjYuMDo0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4
GBAFUWZ/21JMs8lYAtbOxPmgoJb/lqJpqx8aKs47iYKL1mlLpK40gwVYex+jfT4GJ6H9C57UeiPbZHFo
4VtixR/xvDxibO+3nmX619lkncDqIGgNaR1PtLxYB3acaRcVN8/ER8X18nYswVVbtElVQx+1KlPVTgnN
6MU18GY2LNt6Bw
Logging in user... DONE
 
Adding TSA certificate as a trusted certificate... DONE
 
Creating PKCS7 signed data... DONE
Creating CMS signed data... DONE
Creating S/MIME V2 signed content... DONE
Creating S/MIME V3 signed content... DONE
 
Verifying and validating the PKCS7 signed data
signed data contains 1 signatures
verifying and validating signature at index '0'... SUCCESS
 
Verifying and validating the CMS signed data
signed data contains 1 signatures
verifying and validating signature at index '0'... SUCCESS
 
Verifying and validating the S/MIME v2 signed data
signed data contains 1 signatures
verifying and validating signature at index '0'... SUCCESS
 
Verifying and validating the S/MIME v3 signed data
signed data contains 1 signatures
verifying and validating signature at index '0'... SUCCESS