[Mono-bugs] [Bug 425724] New: XML signed with HMAC-SHA256 unsupported

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 12 01:50:46 EDT 2008


           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: spouliot at novell.com
        ReportedBy: fredrik.g.olsson at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          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
$ 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"?>
 <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
Algorithm="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256" />
     <Reference URI="">
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
       <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list