[Mono-list] RSA.FromXmlString does not work with xml namespaces

Jonathan Gagnon jonathan.gagnon at croesus.com
Fri Jul 12 14:02:30 UTC 2013


Hi,

I found a bug in the RSA.FromXmlString implementation in mono (3.0.10).
 Whenever I try to use it with an xml string that contains a namespace, it
throws an exception.  The same code works with .NET.

Here's a little example :

string rsakey =
"<RSAKeyValue><Modulus>sjanng8QA1Puw5S563eglnZgwlQOMcLgAZWHVmWVzAfUotsKc+9HhLpobPdjPsjdJE64Jbx/1oQdjMtx5z9ty+5dlW5fausb4UbFfLSH38Nci/k/qasHCphiuJMtqCYNBYvisf/2rUsj0d5nSxvNNtp37SRbIZ7bDFpmp53kAJU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";
string dsrsakey =
"<ds:RSAKeyValue><ds:Modulus>sjanng8QA1Puw5S563eglnZgwlQOMcLgAZWHVmWVzAfUotsKc+9HhLpobPdjPsjdJE64Jbx/1oQdjMtx5z9ty+5dlW5fausb4UbFfLSH38Nci/k/qasHCphiuJMtqCYNBYvisf/2rUsj0d5nSxvNNtp37SRbIZ7bDFpmp53kAJU=</ds:Modulus><ds:Exponent>AQAB</ds:Exponent></ds:RSAKeyValue>";

RSA rsa = RSA.Create();

rsa.FromXmlString(rsakey); // works in .NET and mono

rsa.FromXmlString(dsrsakey); // works in .NET, mono throws a
System.Security.Cryptography.CryptographicException


Should I file a bug report with this information?

Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130712/62b7aaf3/attachment.html>


More information about the Mono-list mailing list