santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kail" <michael.k...@rl-ag.com>
Subject Remove KeyValue from xml signature
Date Tue, 21 Mar 2006 11:05:48 GMT
Hi to all!

I'v got a problem:
I'm creating an enveloped xml signature. That works. But in the signed
document is Field KeyValue that contains DSAKeyValue. And I just wan't
to know if there is any Way to tell xmlsignature not to write that
information into document(as we don't need it).
Here's my current code:

		javax.xml.parsers.DocumentBuilder db =
dbf.newDocumentBuilder();
	     	org.w3c.dom.Document doc = db.parse(signatureFile);
	      String BaseURI = signatureFile.toURL().toString();

	
ElementProxy.setDefaultPrefix("http://www.w3.org/2000/09/xmldsig#",null)
;
	      
	      XMLSignature sig = new XMLSignature(doc, BaseURI,
	
XMLSignature.ALGO_ID_SIGNATURE_DSA);
	      
	      //add siognature infomaetion to document
	      Node nl = doc.getFirstChild();
	      nl.appendChild(sig.getElement());
	      
	      Transforms transforms = new Transforms(doc);

	
transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE);
	           
	      //add document "archivdescriptor" to signed content
	      sig.addDocument("", transforms,
Constants.ALGO_ID_DIGEST_SHA1);

Hope there's anybody who got a hint!

Thanks for help, michael

Mime
View raw message