throw new WSSecurityException("Error building signature", e);
}
// For now we pass our resolver the root document because the signature element isn't attached
// to the evelope yet (no wsse header). Perhaps we should do this differently
sig.addResourceResolver(new WsuIdResolver(message, header.getElement()));
PrivateKey key = store.getPrivateKey(alias, securityDomainAliasLabel);
if (targets == null || targets.size() == 0)
{
// By default we sign the body element, and a timestamp if it is available