Running Sign
The Sign sample application creates a simple XML signature from a single HTTP reference. The generated XML signature has the following structure.
<Signature> <SignedInfo> <CanonicalizationMethod ... /> <SignatureMethod ... /> <Reference URI= ... > <DigestMethod ... /> <DigestValue ... /> </Reference> </SignedInfo> <SignatureValue ... /> <KeyInfo> <X509Data> <X509SubjectName ... /> </X509Data> <X509Data> <X509Certificate ... /> </X509Data> </KeyInfo>To run this sample application, execute the following command line in the etjava/examples directory.
java -classpath ../lib/enttoolkit.jar;<xalan.jar>;<xercesImpl.jar>;<xml-apis.jar> com.entrust.toolkit.examples.xml.sign.sign <epf_file> <epf_pwd> <init.properties> <in_data> <out_data>|
Parameter |
Value |
|
<xalan.jar> |
The path of the xalan.jar third-party library. |
|
<xercesImpl.jar> |
The path of the xercesImpl.jar third-party library. |
|
<xml-apis.jar> |
The path of the xml-apis.jar third-party library. |
|
<epf_file> |
The path of an Entrust user profile in .epf file format. |
|
<epf_pwd> |
The password for accessing the Entrust profile. |
|
<init.properties> |
The URI of the init.properties initialization file for the IXSIL library. |
|
<in_data> |
The URI of the data to be signed – for example file:///c:/test/binarydata.dat |
|
<out_xml> |
The path of the resulting XML signed file. |
For example:
D:\java\etjava\examples>java -classpath classes;..\lib\enttoolkit.jar;..\lib\xalan.jar;..\lib\xercesImpl.jar;..\lib\xml-apis.jarcom.entrust.toolkit.examples.xml.sign.Sign data\userdata\RSAUser1.epf ~Sample7~file:/d:/java/etjava/examples/data/xml/init/properties/init.propertiesfile:/d:/java/etjava/examples/build.xml sign.xmlLogging in to: data\userdata\RSAUser1.epfInitializing IXSIL properties from "file:/d:/java/etjava/examples/data/xml/init/properties/init.properties"...Signing with RSA private keyDone