bseddon / xml-signer

Provides signing and verification of XML documents including support for XAdES
BSD 3-Clause "New" or "Revised" License
18 stars 7 forks source link

Redundant code? #19

Closed underdpt closed 2 weeks ago

underdpt commented 3 weeks ago

From #18 , looking at XmlSecurityDSig.php line 411, I think the if is redundant, both arms execute the same code, so maybe there's something wrong here:

https://github.com/bseddon/xml-signer/blob/a4ce5a42b9d696faa1cbfdf43f3ebd90662d76f3/src/XMLSecurityDSig.php#L411-L413

This seems to have been corrected on current xmlseclibs library:

https://github.com/robrichards/xmlseclibs/blob/cf50b5023964550d714df76ba9adf21eb6fdaa35/src/XMLSecurityDSig.php#L254-L297

I can submit a PR.

bseddon commented 2 weeks ago

Fair point. The code has been updated.