![[XML Security Suite]](xmlsec.gif)
This package is an implementation of XML-Signature Core Syntax and Processing [W3C REC 12-February-2002]. This package requires Java2 SDK v1.2 or later.
E:\xss4j> set CLASSPATH="E:\xerces-1_4_3\xerces.jar;E:\xalan-j_2_3_0\xalan.jar;E:\xss4j\xss4j.jar;E:\xss4j\samples;"
E:\xss4j> keytool -genkey -dname "CN=John Smith, OU=Java Technology Center, O=IBM, L=Cupertino, S=California, C=US" -alias john(1) -storepass your-storepassword(2) -keypass your-keypassword(3)
The command generates a key pair for DSA. If you want to generate a key pair for RSA signing, add `-keyalg RSA' to the command line.
SampleSign2 is a sample application to create an XML-Signature. With this application, you can create:
Use this program as follows:
E:\xss4j> java dsig.SampleSign2 your-alias(1) your-storepassword(2) your-keypassword(3) <resource> <resource> .... > signature.xml
You can specify <resource> as follows:
This program always uses DSS for signing, SHA1 for digesting, `Canonical XML' Recommendation for canonicalizing SignedInfo.
With TemplateSign, you can create detached, enveloping, or enveloped signature. You must prepare a template, which is an incomplete signature document. It has no KeyInfo element and no content of the SignatureValue element and DigestValue elements. We provide three sample templates in the xss4j/data/dsig/ directory, detached-dsa.templ, detached-rsa.templ, enveloped-dsa.templ, enveloping-dsa.templ, enveloping-rsa.templ.
Use this program as follows:
E:\xss4j> java dsig.TemplateSign your-alias(1) your-storepassword(2) your-keypassword(3) <template-url> > signature.xml
Input the following command:
E:\xss4j> java dsig.VerifyGUI < signature.xml
VerifyGUI reports validity of each resource and validity of the signature.
If the signature and all of signed resources were not modified, VerifyGUI
reports the result of verificaion as "Core Validity: Ok".
If a resource was modified, VerifyGUI reports as "Core Validity: NG".
dsig.VerifyCUI has the same function as dsig.VerifyGUI. dsig.VerifyCUI prints the result to the console.
Note: version numbers are only for XML-Signature implementation, not for whole of XML Security Suite.
KeyInfo and TemplateGenerator.
dsig.SampleSign2: Add -prefix option.W3CCanonicalizer: Does not call setEntityResolver()
with null.
EntityResolver is not called for a
URI followed by "#id".
XPathCanonicalizer instead of
XMLSerializer of Xerces-J.
XMLSerializer of Xerces-J 2.0.0 breaks namespace context.
XPathCanonicalizer about xml:-prefix attributes.
dsig.TemplateSign, dsig.TemplateSignHMAC
and dsig.TemplateManifest
dsig.TemplateSign
dsig.TemplateSignHMAC
dsig.VerifyCUI, dsig.VerifyManifestCUI
dsig-howto.html
EntityResolver calling.
setAttribute("xmlns:...", ns) with
setAttributeNS(XMLNS_NS, "xmlns:...", ns).
dsig.SimpleKey to dsig.util.SimpleKey
dsig.Base64 to dsig.util.Base64
dsig.SignatureGenerator to dsig.TemplateGenerator
dsig.KeyInfoGenerator and related methods. Use KeyInfo#insertTo()
dsig.XSignatureException, which wraps various exceptions
for some methods.
dsig.SampleSign2: Use REC-xml-c14n.
KeyInfo: Changed return type of X509Data.getCRL()
DigestMethod class.
XSignature.
KeyInfo: getKeyValues() -> getKeyValue().
ResourceShower interface definition.
KeyInfo class, that realizes flexible KeyInfo handling.
SignatureContext, NullURIHandler, KeyInfo and so on.