You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have understood your problem correctly; that you would like to have <ds:Reference URI=""> instead of ds:Reference you can pass in the option force_uri when signing:
// 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
);
https://github.com/robrichards/xmlseclibs/blob/master/src/XMLSecurityDSig.php#L662
in XMLSecurityDSig.php, function addRefInternal, when (! $node instanceof DOMDocument) = false , it has no value, so make the URI='' is not exist , it show 'ds:Reference', in my scene, i need it to be '<ds:Reference URI=''>'
so I add else for it
what i need now is work
The text was updated successfully, but these errors were encountered: