protected Transform newTransform(String canonicalizationMethod, TransformParameterSpec paramSpec) throws XMLSignatureException { try { return getSignatureFactory().newTransform(canonicalizationMethod, paramSpec); } catch (GeneralSecurityException e) { throw new XMLSignatureException("unknown canonicalization method: "+canonicalizationMethod, e); } }
protected Transform newTransform(String canonicalizationMethod) throws XMLSignatureException { return newTransform(canonicalizationMethod, null); }
signatureFacet.postSign(document);
public static Reference newReference( String uri , List<Transform> transforms , String type , String id , byte digestValue[] , SignatureConfig signatureConfig) throws XMLSignatureException { // the references appear in the package signature or the package object // so we can use the default digest algorithm String digestMethodUri = signatureConfig.getDigestMethodUri(); XMLSignatureFactory sigFac = signatureConfig.getSignatureFactory(); DigestMethod digestMethod; try { digestMethod = sigFac.newDigestMethod(digestMethodUri, null); } catch (GeneralSecurityException e) { throw new XMLSignatureException("unknown digest method uri: "+digestMethodUri, e); } Reference reference; if (digestValue == null) { reference = sigFac.newReference(uri, digestMethod, transforms, type, id); } else { reference = sigFac.newReference(uri, digestMethod, transforms, type, id, digestValue); } return reference; } }
for (SignatureFacet signatureFacet : signatureConfig.getSignatureFacets()) { LOG.log(POILogger.DEBUG, "invoking signature facet: " + signatureFacet.getClass().getSimpleName()); signatureFacet.preSign(document, references, objects);
public static Reference newReference( String uri , List<Transform> transforms , String type , String id , byte digestValue[] , SignatureConfig signatureConfig) throws XMLSignatureException { // the references appear in the package signature or the package object // so we can use the default digest algorithm String digestMethodUri = signatureConfig.getDigestMethodUri(); XMLSignatureFactory sigFac = signatureConfig.getSignatureFactory(); DigestMethod digestMethod; try { digestMethod = sigFac.newDigestMethod(digestMethodUri, null); } catch (GeneralSecurityException e) { throw new XMLSignatureException("unknown digest method uri: "+digestMethodUri, e); } Reference reference; if (digestValue == null) { reference = sigFac.newReference(uri, digestMethod, transforms, type, id); } else { reference = sigFac.newReference(uri, digestMethod, transforms, type, id, digestValue); } return reference; } }
for (SignatureFacet signatureFacet : signatureConfig.getSignatureFacets()) { LOG.log(POILogger.DEBUG, "invoking signature facet: " + signatureFacet.getClass().getSimpleName()); signatureFacet.preSign(document, references, objects);
protected Transform newTransform(String canonicalizationMethod, TransformParameterSpec paramSpec) throws XMLSignatureException { try { return getSignatureFactory().newTransform(canonicalizationMethod, paramSpec); } catch (GeneralSecurityException e) { throw new XMLSignatureException("unknown canonicalization method: "+canonicalizationMethod, e); } }
protected Transform newTransform(String canonicalizationMethod) throws XMLSignatureException { return newTransform(canonicalizationMethod, null); }
signatureFacet.postSign(document);