//the baseURI. That URI is prepended to all relative URIs.
XMLSignature signature =
new XMLSignature(sigElement,
(new File(filename)).toURL().toString());
signature.addResourceResolver(new OfflineResolver());
//Get the KeyInfo object, which might contain some clues as to what
//key was used to create the signature. It might also contain the
//full cert.
KeyInfo ki = signature.getKeyInfo();