Signature Validation Failed using Java
Opened this issue · 1 comments
kumarakmuz commented
??
Mats commented
This might be due to the element missing the URI attribute.
You can try the following and see if that fixes your problem:
// Sign using SHA-256
$objDSig->addReference(
$doc,
XMLSecurityDSig::SHA256,
['http://www.w3.org/2000/09/xmldsig#enveloped-signature'],
['force_uri' => true] // <----- this causes $force_uri to be true, which in turn results in the attribute URI="" being added
);