Element dsElem = (Element) XPathAPI.selectSingleNode(doc,
"//ds:Signature[1]", context);
XMLSignature signature = new XMLSignature(dsElem, currentSystemId);
// how can I reg my own keystore?
boolean verify = signature.checkSignatureValue(signature.getKeyInfo().getPublicKey());
System.out.println("Signature " + (verify
? "Verification successful"
: "Verification failed"));
System.out.println("Canonicalized SignedInfo:");