Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 34768 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 13285 [details]
I'm currently porting some managed Windows libs to run on OSX using Mono, and one of the issues I have is that some functionality that uses System.Security.Cryptography.Xml.SignedXml to sign XML files is failing.
I'm still trying to get to the bottom of it, but as the code works as is on the Microsoft\Windows libs and fails on Mono, I'm raising it as a mono issue.
The attached test app shows a case where the call to SignedXml.CheckSignature() fails on OSX/Mono, but works on Windows.
After a bit of testing, it seems that it fails with the XML
"<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><string>1234567890123</string><string>0987654321234</string></ArrayOfString>"
but works with
"<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns=""><string>1234567890123</string><string>0987654321234</string></ArrayOfString>"
and debugging through it, it looks like the issue in the first case is that the transformations performed on the XML during signing causes extra 'xmlns=""' attributes to be added to the <string> nodes, causing it to produce the wrong hash.
Anyone who knows more about how this stuff works have any ideas?