https://bugzilla.novell.com/show_bug.cgi?id=425724
Summary: XML signed with HMAC-SHA256 unsupported
Product: Mono: Class Libraries
Version: 2.0
Platform: x86
OS/Version: openSUSE 10.3
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Mono.Security
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Created an attachment (id=239206)
--> (https://bugzilla.novell.com/attachment.cgi?id=239206)
Test case which generates and verifies HMAC-SHA256 signed XML.
Generating XML signatures using the HMAC-SHA256 algorithm throws the following
runtime exception:
Unhandled Exception: System.Security.Cryptography.CryptographicException:
unsupported algorithm
at System.Security.Cryptography.Xml.SignedXml.ComputeSignature
(System.Security.Cryptography.KeyedHashAlgorithm macAlg) [0x00000]
at SignHMACSHA256.Main () [0x00000]
$ gmcs --version
Mono C# compiler version 2.0.0.0
$ mono --version
Mono JIT compiler version 2.0 (tarball)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
However, running the same test case on Microsoft .NET gives the correct result:
<?xml version="1.0" encoding="IBM437"?>
<foo>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256" />
<Reference URI="">
<Transforms>
<Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>sKG2hDPEHiPrzpd3QA8BZ0eMzMbSEPPMh9QqXgkP7Cs=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>Faad3KInJdIpaGcBn5e04Zv080u45fSjAKqrgevdWQw=</SignatureValue>
</Signature>
</foo>
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs