Bug 50236

Summary: VerifyMerlinsExamplesFifteen/Sixteen.java samples should ignore signature-enveloping-hmac-sha1-40.xml
Product: Security - Now in JIRA Reporter: sean.mullan
Component: SignatureAssignee: XML Security Developers Mailing List <security-dev>
Status: NEW ---    
Severity: minor    
Priority: P2    
Version: Java 1.4.2   
Target Milestone: ---   
Hardware: All   
OS: All   

Description sean.mullan 2010-11-08 12:59:19 UTC
This a minor cleanup issue but these samples should not validate signature-enveloping-hmac-sha1-40.xml. This signature uses an insecure HMAC truncation length and since release 1.4.3, this signature causes a validation failure. See https://issues.apache.org/bugzilla/show_bug.cgi?id=47526 for more information. If you run the mega-sample target, you will see this exception embedded in the output:

     [java] org.apache.xml.security.signature.XMLSignatureException: HMACOutputLength must not be less than 160
     [java]     at org.apache.xml.security.algorithms.implementations.IntegrityHmac.engineVerify(Unknown Source)
     [java]     at org.apache.xml.security.algorithms.SignatureAlgorithm.verify(Unknown Source)
     [java]     at org.apache.xml.security.signature.XMLSignature.checkSignatureValue(Unknown Source)
     [java]     at org.apache.xml.security.samples.signature.VerifyMerlinsExamplesFifteen.verifyHMAC(Unknown Source)
     [java]     at org.apache.xml.security.samples.signature.VerifyMerlinsExamplesFifteen.main(Unknown Source)