Signature sig = security.getSignature();
SignatureOptions options = sig.getDefaultSignatureOptions();
options.setCertificate(cert);
options.setSigningKey(signingKey);
Element element = doc.getRoot();
element = sig.sign(element, options);
return element.getDocument();
}
private Document<Element> getDocument(BufferingResponseWrapper wrapper) {
Reader rdr = wrapper.getReader();