I have an issue that my XML signature cannot be verified with an external (e-government) tool. The XML document contains an <xml-stylesheet> directive and this causes a problem. if I remove it, an XML is signed and verified correctly as well. The signature can be, however, verified with a simple Java application I wrote (I don't know what's difference between those two tools - but normally it must be verifiable with any tool - right?). Can someone help me pls? Thanks in advance.
SignedInfo si = fac
(C14NMethodParameterSpec) null), fac
KeyInfoFactory kif = fac.getKeyInfoFactory();
List x509Content = new ArrayList();
X509Data xd = kif.newX509Data(x509Content);
KeyInfo ki = kif.newKeyInfo(Collections.singletonList(xd));
DOMSignContext dsc = new DOMSignContext(signRequest.getPrivateKey(),
Maybe one detail more: signing the same document with and without xslt-stylesheet directive gives me different digest values and signature values as well. If I say that my root node should be signed how is it possible that those changes are relevant? Is whole document always signed? I really don't get it... Any tips? Thnx for any help.