in proxy/core/src/main/java/com/amazon/aws/pix/core/xml/XmlSigner.java [157:179]
protected List<Reference> getReferences(XMLSignatureFactory signatureFactory, KeyInfo keyInfo) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException {
return List.of(
signatureFactory.newReference(
"#" + keyInfo.getId(),
signatureFactory.newDigestMethod(xmlDigestMethod, null),
List.of(
signatureFactory.newTransform(canonicalizationMethod, (TransformParameterSpec) null)
),
null,
null
),
signatureFactory.newReference(
"", // in this case we are signing the whole document, so the URI of ""
signatureFactory.newDigestMethod(xmlDigestMethod, null),
List.of(
signatureFactory.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null),
signatureFactory.newTransform(canonicalizationMethod, (TransformParameterSpec) null)
),
null,
null
)
);
}